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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Nov 8 20:25:14 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.10

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bc4acb974322da25075fe9056feafe092560c681

Thanks.

Luca Boccassi

---
>From bc4acb974322da25075fe9056feafe092560c681 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

[ 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 4ead74412b..6d97fbfdda 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -652,12 +652,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.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-08 19:23:52.829216495 +0000
+++ 0016-net-bonding-fix-possible-overrun.patch	2023-11-08 19:23:51.777396376 +0000
@@ -1 +1 @@
-From 925f8582c49c79f588cb4c96f510fb94becbb3bc Mon Sep 17 00:00:00 2001
+From bc4acb974322da25075fe9056feafe092560c681 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 925f8582c49c79f588cb4c96f510fb94becbb3bc ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 677067870f..79f1b3f1a0 100644
+index 4ead74412b..6d97fbfdda 100644
@@ -26 +27 @@
-@@ -654,12 +654,9 @@ tx_machine(struct bond_dev_private *internals, uint16_t member_id)
+@@ -652,12 +652,9 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)


More information about the stable mailing list