[dpdk-stable] patch 'net/bonding: fix OOB access in other aggregator modes' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:33:06 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.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 12/21/19. 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.

Thanks.

Luca Boccassi

---
>From 24e5386c451ff1061b6cc4198bf7d4e18f358591 Mon Sep 17 00:00:00 2001
From: Hui Zhao <zhaohui8 at huawei.com>
Date: Thu, 21 Mar 2019 21:28:14 +0100
Subject: [PATCH] net/bonding: fix OOB access in other aggregator modes

[ upstream commit dfbc596c2e1418780f77954e1859ffec9aebfe4f ]

slave aggregator_port_id is in [0, RTE_MAX_ETHPORTS-1] range.
If RTE_MAX_ETHPORTS is > 8, we can hit out of bound accesses on
agg_bandwidth[] and agg_count[] arrays.

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

Signed-off-by: Hui Zhao <zhaohui8 at huawei.com>
Signed-off-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Chas Williams <chas3 at att.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index abf833f6e1..faaaddec69 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -690,8 +690,8 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
 	struct port *agg, *port;
 	uint16_t slaves_count, new_agg_id, i, j = 0;
 	uint16_t *slaves;
-	uint64_t agg_bandwidth[8] = {0};
-	uint64_t agg_count[8] = {0};
+	uint64_t agg_bandwidth[RTE_MAX_ETHPORTS] = {0};
+	uint64_t agg_count[RTE_MAX_ETHPORTS] = {0};
 	uint16_t default_slave = 0;
 	uint16_t mode_count_id;
 	uint16_t mode_band_id;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:27.894695538 +0000
+++ 0039-net-bonding-fix-OOB-access-in-other-aggregator-modes.patch	2019-12-19 14:32:25.881293384 +0000
@@ -1,14 +1,15 @@
-From dfbc596c2e1418780f77954e1859ffec9aebfe4f Mon Sep 17 00:00:00 2001
+From 24e5386c451ff1061b6cc4198bf7d4e18f358591 Mon Sep 17 00:00:00 2001
 From: Hui Zhao <zhaohui8 at huawei.com>
 Date: Thu, 21 Mar 2019 21:28:14 +0100
 Subject: [PATCH] net/bonding: fix OOB access in other aggregator modes
 
+[ upstream commit dfbc596c2e1418780f77954e1859ffec9aebfe4f ]
+
 slave aggregator_port_id is in [0, RTE_MAX_ETHPORTS-1] range.
 If RTE_MAX_ETHPORTS is > 8, we can hit out of bound accesses on
 agg_bandwidth[] and agg_count[] arrays.
 
 Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes")
-Cc: stable at dpdk.org
 
 Signed-off-by: Hui Zhao <zhaohui8 at huawei.com>
 Signed-off-by: David Marchand <david.marchand at redhat.com>
@@ -19,10 +20,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
-index c6a645a653..7d8da2b318 100644
+index abf833f6e1..faaaddec69 100644
 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
 +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
-@@ -670,8 +670,8 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -690,8 +690,8 @@ selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
  	struct port *agg, *port;
  	uint16_t slaves_count, new_agg_id, i, j = 0;
  	uint16_t *slaves;


More information about the stable mailing list