patch 'net/enic: fix dereference before null check' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:35:15 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/90386f428c9006dfde5c9e0983ad7bdfa3950c5a

Thanks.

Kevin

---
>From 90386f428c9006dfde5c9e0983ad7bdfa3950c5a Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06 at foxmail.com>
Date: Tue, 25 Jan 2022 20:00:49 +0800
Subject: [PATCH] net/enic: fix dereference before null check

[ upstream commit a5f42986968a0699e070c56f1033aee5f90d2c12 ]

Move memcpy to 'ah->key' after 'ah' null check

Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")

Signed-off-by: Weiguo Li <liwg06 at foxmail.com>
Reviewed-by: John Daley <johndale at cisco.com>
---
 drivers/net/enic/enic_fm_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index bef842d460..ab73cd8530 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -2373,9 +2373,9 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
 
 		ah = calloc(1, sizeof(*ah));
-		memcpy(&ah->key, action_in, sizeof(struct fm_action));
 		if (ah == NULL)
 			return rte_flow_error_set(error, ENOMEM,
 					   RTE_FLOW_ERROR_TYPE_HANDLE,
 					   NULL, "enic: calloc(fm-action)");
+		memcpy(&ah->key, action_in, sizeof(struct fm_action));
 		args[0] = FM_ACTION_ALLOC;
 		args[1] = fm->cmd.pa;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:47.327272253 +0000
+++ 0126-net-enic-fix-dereference-before-null-check.patch	2022-02-21 15:22:44.253704491 +0000
@@ -1 +1 @@
-From a5f42986968a0699e070c56f1033aee5f90d2c12 Mon Sep 17 00:00:00 2001
+From 90386f428c9006dfde5c9e0983ad7bdfa3950c5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a5f42986968a0699e070c56f1033aee5f90d2c12 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index bf04d714d0..d8718d17ef 100644
+index bef842d460..ab73cd8530 100644
@@ -21 +22 @@
-@@ -2522,9 +2522,9 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
+@@ -2373,9 +2373,9 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,



More information about the stable mailing list