From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1C23643345 for ; Thu, 16 Nov 2023 14:24:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16288402DD; Thu, 16 Nov 2023 14:24:30 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id B5F66402C6 for ; Thu, 16 Nov 2023 14:24:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700141068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N5F9vsiDOLaICclcwbt6wv11MmAdEry904PZa8yrutM=; b=jTW9gsfGbVXeSH3hGioXmK/vJj51cf1CnV4I8B6hAqT0MW+3kAfLILa7POc5flMGaOJ4kl +yxq9gg6gAlMaTuRtPUbetEB84SJCq1XKaKnsMNBF9pF81Cyb2XFqAb+DQECJa1GK0jEj4 tij0BmAJAPlu0frHVq+mFc5x4IBLT/g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-588-l-VRRNEsMEe50sZ5_F3-bA-1; Thu, 16 Nov 2023 08:24:24 -0500 X-MC-Unique: l-VRRNEsMEe50sZ5_F3-bA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D2C4101A529; Thu, 16 Nov 2023 13:24:24 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21BAF2166B27; Thu, 16 Nov 2023 13:24:22 +0000 (UTC) From: Kevin Traynor To: Long Wu Cc: Chaoyong He , Peng Zhang , Ferruh Yigit , dpdk stable Subject: patch 'net/bonding: fix possible overrun' has been queued to stable release 21.11.6 Date: Thu, 16 Nov 2023 13:23:01 +0000 Message-ID: <20231116132348.557257-19-ktraynor@redhat.com> In-Reply-To: <20231116132348.557257-1-ktraynor@redhat.com> References: <20231116132348.557257-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 21.11.6 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/21/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/d0f7aa36adeb7b519cdcc4480a036f068f846e8b Thanks. Kevin --- >From d0f7aa36adeb7b519cdcc4480a036f068f846e8b Mon Sep 17 00:00:00 2001 From: Long Wu 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 Reviewed-by: Chaoyong He Reviewed-by: Peng Zhang Acked-by: Ferruh Yigit --- 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 b3cddd8a20..e4eb113927 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -653,10 +653,7 @@ 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]; -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-16 13:21:53.027880445 +0000 +++ 0019-net-bonding-fix-possible-overrun.patch 2023-11-16 13:21:52.437946337 +0000 @@ -1 +1 @@ -From 925f8582c49c79f588cb4c96f510fb94becbb3bc Mon Sep 17 00:00:00 2001 +From d0f7aa36adeb7b519cdcc4480a036f068f846e8b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 925f8582c49c79f588cb4c96f510fb94becbb3bc ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 677067870f..79f1b3f1a0 100644 +index b3cddd8a20..e4eb113927 100644 @@ -26 +27 @@ -@@ -655,10 +655,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t member_id) +@@ -653,10 +653,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)