patch 'eventdev: fix possible array underflow/overflow' has been queued to stable release 23.11.3

Xueming Li xuemingl at nvidia.com
Sat Dec 7 09:00:23 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=717465a84d31115f76a9ca33fb09d0bcceff6255

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 717465a84d31115f76a9ca33fb09d0bcceff6255 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Thu, 14 Nov 2024 11:55:38 +0000
Subject: [PATCH] eventdev: fix possible array underflow/overflow
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 952b24bd0475450e548d4aafae7d8cf48258402b ]

If the number of interrupts is zero, then indexing an array by
"nb_rx_intr - 1" will cause an out-of-bounds write  Fix this by putting
in a check that nb_rx_intr > 0 before doing the array write.

Coverity issue: 448870
Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 1b83a55b5c..bdcc3e3539 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -2299,7 +2299,7 @@ rxa_sw_add(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id,
 			for (i = 0; i < dev_info->dev->data->nb_rx_queues; i++)
 				dev_info->intr_queue[i] = i;
 		} else {
-			if (!rxa_intr_queue(dev_info, rx_queue_id))
+			if (!rxa_intr_queue(dev_info, rx_queue_id) && nb_rx_intr > 0)
 				dev_info->intr_queue[nb_rx_intr - 1] =
 					rx_queue_id;
 		}
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-12-06 23:26:46.230994302 +0800
+++ 0065-eventdev-fix-possible-array-underflow-overflow.patch	2024-12-06 23:26:43.983044827 +0800
@@ -1 +1 @@
-From 952b24bd0475450e548d4aafae7d8cf48258402b Mon Sep 17 00:00:00 2001
+From 717465a84d31115f76a9ca33fb09d0bcceff6255 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 952b24bd0475450e548d4aafae7d8cf48258402b ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 3ee20d95f3..39674c4604 100644
+index 1b83a55b5c..bdcc3e3539 100644


More information about the stable mailing list