patch 'net/bonding: fix possible overrun' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:10:55 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

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/13/23. 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=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=22b7f9edf9f05ef32b5be7319037510abd63771a

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 22b7f9edf9f05ef32b5be7319037510abd63771a Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu at corigine.com>
Date: Wed, 1 Nov 2023 10:19:59 +0800
Subject: [PATCH] net/bonding: fix possible overrun
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 925f8582c49c79f588cb4c96f510fb94becbb3bc ]

CI found that overrunning array of 32 2-byte elements at
element index 65535 (byte offset 131071) by dereferencing
pointer "members + agg_new_idx".

Coverity issue: 403099
Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes")

Signed-off-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 4a266bb2ca..928dfca7af 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -654,12 +654,9 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
 }
 
 static uint16_t
-max_index(uint64_t *a, int n)
+max_index(uint64_t *a, uint16_t n)
 {
-	if (n <= 0)
-		return -1;
-
-	int i, max_i = 0;
+	uint16_t i, max_i = 0;
 	uint64_t max = a[0];
 
 	for (i = 1; i < n; ++i) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:24.162771400 +0800
+++ 0030-net-bonding-fix-possible-overrun.patch	2023-12-11 17:56:22.937652300 +0800
@@ -1 +1 @@
-From 925f8582c49c79f588cb4c96f510fb94becbb3bc Mon Sep 17 00:00:00 2001
+From 22b7f9edf9f05ef32b5be7319037510abd63771a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 925f8582c49c79f588cb4c96f510fb94becbb3bc ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 677067870f..79f1b3f1a0 100644
+index 4a266bb2ca..928dfca7af 100644
@@ -26 +28 @@
-@@ -654,12 +654,9 @@ tx_machine(struct bond_dev_private *internals, uint16_t member_id)
+@@ -654,12 +654,9 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)


More information about the stable mailing list