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 A1C87432DA for ; Wed, 8 Nov 2023 20:26:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BA04406A2; Wed, 8 Nov 2023 20:26:28 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id AC1A140395 for ; Wed, 8 Nov 2023 20:26:26 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-32f7c44f6a7so18033f8f.1 for ; Wed, 08 Nov 2023 11:26:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699471586; x=1700076386; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KLhTjPieeIof/R0fEvlI7++I5laOua5HAgk0K/Us8yY=; b=BrWvyONxw8ce6IW+YdxW71vIYF1qMfzZLSktpkT8Eu5npTjpMmZjuGh0EbbX3WFrE4 Q7ZRmcXNcTA3ArGES71iQ9WE4dyI4aooLn7ORJ+pYCf7kTI3rQRDoWF7gvScpijUjS3h 4Yd7qDOheDhWRJoCI9qr16VrCNj3lCJQrz+nE6tmIgsuOzm8oOBHN8JN+Y2C/pVwfs1G U+C8Aflgwlwh+Dy90AAU8ss2PpPT/CuGw/HAGMaEUuMC/S577B5wYwDDJR92dU5CA6NT yOnyfEd1Acz4ugdGljFCI6tQQdRU7pPCR9gHrqhhPurR1t2dHtblm1LnZ6l0FvTlUdzr 7KjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699471586; x=1700076386; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KLhTjPieeIof/R0fEvlI7++I5laOua5HAgk0K/Us8yY=; b=SDXHeTQ9IpQuzdSbEIZlHqV/KDWmS0g7eJZCzV3DYJvtj9fx/VvWLVlm6LcbYCmkhY 8nFZXKsJz7ov5XQ4awdrPzi4jvpZdRTK52ncKheJlpVRKTiRfthN13C5+EdzaJO7vUiT uwmJph55vMY/8hm8VfLEF7VZM713OE6sxt/3/IywFNYUytstT3MM2Z0uviDfmOMqiSnZ DWIo+w3G5upmRQ3q/3vJuOu7kDe8n7rnIYjmWLMHzIDZRdF8tJaj3cAnx9UARjEC5uQb Vx9UAalxLCiI+FU8Ob3fmhm1F59M8g618U1vByT5ssbHgje+BBgB03G01R5eLnWesUmT LHAw== X-Gm-Message-State: AOJu0YzIuEdd4tQmtBLQLfk1P5ueNs/VkcJbfwHrmezpVYdRHAismQoU b9QOZMlgbCzJKEjpdLYZdv0Keosz2hxjAQ== X-Google-Smtp-Source: AGHT+IE22iVlVBdPFPFh1xSsc2bDZhhWqZ+kFQyOBORl0crLtI4tJfUfJ13Pa1LK+SZS+dvmwqG55w== X-Received: by 2002:a05:6000:18ad:b0:32f:7628:df3b with SMTP id b13-20020a05600018ad00b0032f7628df3bmr2712213wri.6.1699471586273; Wed, 08 Nov 2023 11:26:26 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id v17-20020a5d5911000000b00326b8a0e817sm5595865wrd.84.2023.11.08.11.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 11:26:25 -0800 (PST) From: luca.boccassi@gmail.com 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 20.11.10 Date: Wed, 8 Nov 2023 19:25:14 +0000 Message-Id: <20231108192535.922238-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108192535.922238-1-luca.boccassi@gmail.com> References: <20231018235930.3144-41-luca.boccassi@gmail.com> <20231108192535.922238-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 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 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@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)