From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EF88A04F3 for ; Thu, 19 Dec 2019 15:36:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 361F1330; Thu, 19 Dec 2019 15:36:34 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id C83BD330 for ; Thu, 19 Dec 2019 15:36:32 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id c9so6203813wrw.8 for ; Thu, 19 Dec 2019 06:36:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NzrWNeP/cekO8F1rA4UNs0Ml/wwd4NppG3fi48/R3tE=; b=JMjKTvDsTqPQnDOzB6WdF3OYXrHnwsq31mroyUiHsTUA2/IoxeR9NiLXy9KfeAFvCR YbwvAKiNr0QWk4YamFKtbePXJso5lAKhwZvSj1znLZgGg9xuqlyxJdTPFhWYjBUVimu4 WyHesYjJIkJVegp6Z2TA2mW75Ib4SJKzR8EXwHAqONSpvAD2ja5xxRR+M62IOix2Rglz C4SVskEobTEHXnSu0dGuJugfv6pnvFdOEdnllo0HqwsPJ80BZA+Xc+jxPZL5DaMrbG+f 0dsA2D57V4RKy8C4ZGjtNmokGDj30baItgDqNioOmHZNiBJXD77ro5oaOOt6wonsNjv0 OYUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NzrWNeP/cekO8F1rA4UNs0Ml/wwd4NppG3fi48/R3tE=; b=C72/qBU08XOGaGdQh75QBTmef2hBEJFroD0CzAwNeycNgtqRxTHgC/7D8naOU2Qqgh idjijAgIq8LZkRslFRhrU48/iOI3blQH/yIWQ8Hz1gxxf345fPS2An8bML1iMwrM0h+N otnZsfwwJAquFcOosHeq7rEkuigON3YPoZpycNSfSPzisfIqIaxYrkwpqMNK5CeTjWzD 8YaX2iF4m0iZ4AjK4FLF9F9tnhzVtrlIv99dHEKncajUbK95SaqEihZ0rW/oinbDVXrh R9VgxgGSsxA3Wqboj8FN5FHGT5nmILT8bGaQuZgqhHSbRZEgWBeoXGr/H//jD5BY0Krr obEw== X-Gm-Message-State: APjAAAX1F9E9yKO8kIYuBJWK6qqjeCw+YYeHhzu3TsLk5whuY+hf+Uz0 /2UwHL6A9aNcM1mxi9PMCjE= X-Google-Smtp-Source: APXvYqy6s9xxIvyKF1dTJBqTsKvSFaia6da3xfCtTPD13j/WzdidWeuKtvV+31hW8S1nIXZ8+EG2sw== X-Received: by 2002:adf:ef4e:: with SMTP id c14mr10081874wrp.142.1576766192518; Thu, 19 Dec 2019 06:36:32 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i8sm6681184wro.47.2019.12.19.06.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:36:31 -0800 (PST) From: luca.boccassi@gmail.com To: Hui Zhao Cc: David Marchand , Maxime Coquelin , Chas Williams , dpdk stable Date: Thu, 19 Dec 2019 14:33:06 +0000 Message-Id: <20191219143447.21506-39-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bonding: fix OOB access in other aggregator modes' has been queued to LTS release 17.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Signed-off-by: David Marchand Reviewed-by: Maxime Coquelin Acked-by: Chas Williams --- 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 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@dpdk.org Signed-off-by: Hui Zhao Signed-off-by: David Marchand @@ -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;