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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 18 13:38:51 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.5

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/20/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/463673460a3fd3a98b48c724865bb995f7aeb4a9

Thanks.

Luca Boccassi

---
>From 463673460a3fd3a98b48c724865bb995f7aeb4a9 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 36ba95943f..a083ec1ed8 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -2196,11 +2196,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
 		memcpy(fma, action_in, sizeof(*fma));
 
 		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;
 		ret = flowman_cmd(fm, args, 2);
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-18 12:37:41.047011512 +0000
+++ 0082-net-enic-fix-dereference-before-null-check.patch	2022-02-18 12:37:37.762793528 +0000
@@ -1 +1 @@
-From a5f42986968a0699e070c56f1033aee5f90d2c12 Mon Sep 17 00:00:00 2001
+From 463673460a3fd3a98b48c724865bb995f7aeb4a9 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 36ba95943f..a083ec1ed8 100644
@@ -21 +22 @@
-@@ -2521,11 +2521,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
+@@ -2196,11 +2196,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,


More information about the stable mailing list