patch 'eventdev/eth_tx: fix adapter creation' has been queued to stable release 19.11.13

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:54:55 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/ad8183f3cb3b2c1e0a386f16a2305e3a209c9790

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From ad8183f3cb3b2c1e0a386f16a2305e3a209c9790 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k at intel.com>
Date: Thu, 16 Jun 2022 10:44:58 +0530
Subject: [PATCH] eventdev/eth_tx: fix adapter creation

[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ]

During adapter create, memory is allocated for storing event port
configuration which is freed during adapter free. The following
error is seen during free "EAL: Error: Invalid memory"

The service data pointer storage for txa_service_data_array is
allocated during adapter create with incorrect size which is less
than the required size.
Initialization of this memory causes buffer overflow and result in
metadata overwrite of event port config memory allocated above
and results in the above error message during free.

Allocating the correct size of memory for txa_service_data_array
prevents overwriting other memory areas like event port config
memory.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k at intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan at intel.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index 38bc79c51b..cab4bd0811 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -223,7 +223,7 @@ txa_service_data_init(void)
 	if (txa_service_data_array == NULL) {
 		txa_service_data_array =
 				txa_memzone_array_get("txa_service_data_array",
-					sizeof(int),
+					sizeof(*txa_service_data_array),
 					RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE);
 		if (txa_service_data_array == NULL)
 			return -ENOMEM;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.682328126 +0200
+++ 0060-eventdev-eth_tx-fix-adapter-creation.patch	2022-07-07 09:54:10.965824617 +0200
@@ -1 +1 @@
-From 3d6e9dd493784d077b9a214a0937331fa05f8abf Mon Sep 17 00:00:00 2001
+From ad8183f3cb3b2c1e0a386f16a2305e3a209c9790 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
@@ -30,5 +31,5 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index 1b304f0a73..c700fb7b1f 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
-@@ -224,7 +224,7 @@ txa_service_data_init(void)
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index 38bc79c51b..cab4bd0811 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -223,7 +223,7 @@ txa_service_data_init(void)


More information about the stable mailing list