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

Xueming Li xuemingl at nvidia.com
Wed Jul 20 10:20:42 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 07/22/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/a6ae86b161dc19dbdfeecabb41c106c4214f79da

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From a6ae86b161dc19dbdfeecabb41c106c4214f79da 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 21155362f9..6474056c90 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -224,7 +224,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.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:00:59.390457866 +0800
+++ 0013-eventdev-eth_tx-fix-adapter-creation.patch	2022-07-20 15:00:58.671000561 +0800
@@ -1 +1 @@
-From 3d6e9dd493784d077b9a214a0937331fa05f8abf Mon Sep 17 00:00:00 2001
+From a6ae86b161dc19dbdfeecabb41c106c4214f79da Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 3d6e9dd493784d077b9a214a0937331fa05f8abf ]
@@ -22 +24,0 @@
-Cc: stable at dpdk.org
@@ -27 +29 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
@@ -30,4 +32,4 @@
-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
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index 21155362f9..6474056c90 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c


More information about the stable mailing list