patch 'examples/ipsec-secgw: fix uninitialized memory access' has been queued to stable release 20.11.6

Xueming Li xuemingl at nvidia.com
Tue Jun 21 10:02:09 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/23/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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/78059ea5a5fd9eed93237e9a6d04dd3b96ae1d38

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 78059ea5a5fd9eed93237e9a6d04dd3b96ae1d38 Mon Sep 17 00:00:00 2001
From: Volodymyr Fialko <vfialko at marvell.com>
Date: Fri, 25 Mar 2022 12:29:42 +0100
Subject: [PATCH] examples/ipsec-secgw: fix uninitialized memory access
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 0b512a92b77009ab6e4291382b18f0e0ac74645f ]

rte_flow_validate and rte_flow_create not always initialize flow error.
Using error.message in some error cases will cause read from
uninitialized memory.

Fixes: 6738c0a9569 ("examples/ipsec-secgw: support flow director")

Signed-off-by: Volodymyr Fialko <vfialko at marvell.com>
Acked-by: Anoob Joseph <anoobj at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 examples/ipsec-secgw/flow.c  | 2 +-
 examples/ipsec-secgw/ipsec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/flow.c b/examples/ipsec-secgw/flow.c
index 1a1ec7861c..c217b9e475 100644
--- a/examples/ipsec-secgw/flow.c
+++ b/examples/ipsec-secgw/flow.c
@@ -214,7 +214,7 @@ flow_init_single(struct flow_rule_entry *rule)
 	struct rte_flow_item pattern[MAX_RTE_FLOW_PATTERN] = {};
 	struct rte_flow_action action[MAX_RTE_FLOW_ACTIONS] = {};
 	struct rte_flow_attr attr = {};
-	struct rte_flow_error err;
+	struct rte_flow_error err = {};
 	int ret;
 
 	attr.egress = 0;
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 6baeeb342f..a8a8cdbe2e 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -425,7 +425,7 @@ int
 create_ipsec_esp_flow(struct ipsec_sa *sa)
 {
 	int ret = 0;
-	struct rte_flow_error err;
+	struct rte_flow_error err = {};
 	if (sa->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
 		RTE_LOG(ERR, IPSEC,
 			"No Flow director rule for Egress traffic\n");
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-21 15:37:52.160100934 +0800
+++ 0063-examples-ipsec-secgw-fix-uninitialized-memory-access.patch	2022-06-21 15:37:49.081118072 +0800
@@ -1 +1 @@
-From 0b512a92b77009ab6e4291382b18f0e0ac74645f Mon Sep 17 00:00:00 2001
+From 78059ea5a5fd9eed93237e9a6d04dd3b96ae1d38 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 0b512a92b77009ab6e4291382b18f0e0ac74645f ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -35 +37 @@
-index 2d4a26c962..b66ff2b650 100644
+index 6baeeb342f..a8a8cdbe2e 100644
@@ -38 +40 @@
-@@ -496,7 +496,7 @@ int
+@@ -425,7 +425,7 @@ int


More information about the stable mailing list