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 67A0DA0544 for ; Fri, 11 Nov 2022 12:39:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6438042D0E; Fri, 11 Nov 2022 12:39:43 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 5BDBC40141 for ; Fri, 11 Nov 2022 12:39:42 +0100 (CET) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (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 smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id CF4B94246C for ; Fri, 11 Nov 2022 11:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166781; bh=uRPdmlSIgwPX8+hxxHjoEcMteHRLkrN77n3suzvEuvM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XRgUPWXtoicQPm0mm9ZvMhkOCB6LcqORj0LSa2mu6OM1SdBW+2U3dn0K8nZNRr8xr GXRZYm9x4FXnlZYqZ5Z0xzn1ZyG/eDZO7E06Oq6YmqZj5QVIbm3r0ojIRq6tYjYCuv WkduA73NMYaCD5jtCb946B5Ywr9nTC+SaelKH5v3gwApzIf3ZF5W8uoxBMaFKtgmnF gsaLS9rn6EJh7ElcfTrMnwgJJJYWAKusxTcbq0fmlUqkWdhBbsa/ONeMyc/dnWjH/o DAXCvN3xRAoz11NRE16stFRYJ4ytvCGV2W1IfcBua/OvLMt3HKGSke/ZP4eRTW2O2t QSrq7/tdjUO5A== Received: by mail-ej1-f71.google.com with SMTP id gt15-20020a1709072d8f00b007aaac7973fbso2909661ejc.23 for ; Fri, 11 Nov 2022 03:39:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=uRPdmlSIgwPX8+hxxHjoEcMteHRLkrN77n3suzvEuvM=; b=lmSiR1fY8+DaBU7ljGkdz59rkrvyXLe1wZatoH4Rio2LT8BkchK7xY1Qnx5Cncd6i3 unfpU+rqb5misBMhrF8v5t4fQ49TlcrOxbbSHuGkFpKKL4XV+AD03MojFGexOspXRdeh jYRk3UJZ56J5U3e5SSAdV+r4q5iPR0GhoBsZAk57+ZuJgoTe/ut0R7/Yf71llpi4OlWE vORgCbcqRA3zmVdqwU9ybBDC26EIW+RBCVz0/hHHPBNPSucnD36nicPsm265ZTaNVEwP B0J9G8jEDrL1Oz6nvrqnMT7i6kbg8VsRc153J0RlsEoQAytNwFIymmUDb2BDM0eI2Fcy MJ/Q== X-Gm-Message-State: ANoB5pn1BQHuQODA0Eu2iSduD+dU3eazR09awDOnaao+cBExdPiuJXSm C8BqNEhaBrOr9IaQxk2e0E0z1aYLY91PdDXJckrGgB8TxBUz2xm0BkDohPvh1z4otqdRKtauk2q Hiy9BhPmIlKQBOIi/m8x6fMBE X-Received: by 2002:a17:906:1248:b0:7ad:f9da:8986 with SMTP id u8-20020a170906124800b007adf9da8986mr1570060eja.54.1668166772177; Fri, 11 Nov 2022 03:39:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf49ex8IlV3BCyrv7KyQ61Vh8d360NlzF4bpSoQctJ0TJ5VXMzLySW7/HbphDtKtMsV/Yp8IHA== X-Received: by 2002:a17:906:1248:b0:7ad:f9da:8986 with SMTP id u8-20020a170906124800b007adf9da8986mr1569625eja.54.1668166760280; Fri, 11 Nov 2022 03:39:20 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id vi2-20020a170907d40200b007933047f923sm774128ejc.118.2022.11.11.03.39.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:39:19 -0800 (PST) From: christian.ehrhardt@canonical.com To: Yunjian Wang Cc: Lei Ji , Min Hu , dpdk stable Subject: patch 'net/bonding: fix array overflow in Rx burst' has been queued to stable release 19.11.14 Date: Fri, 11 Nov 2022 12:38:21 +0100 Message-Id: <20221111113904.1549618-4-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.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 19.11.14 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/18/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/10754b6858235bfc341d437009526c705fdbf988 Thanks. Christian Ehrhardt --- >From 10754b6858235bfc341d437009526c705fdbf988 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Mon, 18 Jul 2022 21:08:44 +0800 Subject: [PATCH] net/bonding: fix array overflow in Rx burst [ upstream commit 007c5450dfa094f7e07ebee3610bcb3494ef842c ] In bond_ethdev_rx_burst() function, we check the validity of the 'active_slave' as this code: if (++active_slave == slave_count) active_slave = 0; However, the value of 'active_slave' maybe equal to 'slave_count', when a slave is down. This is wrong and it can cause buffer overflow. This patch fixes the issue by using '>=' instead of '=='. Fixes: e1110e977648 ("net/bonding: fix Rx slave fairness") Signed-off-by: Lei Ji Signed-off-by: Yunjian Wang Acked-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index d6dbd2fb8a..c8bd7064ce 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -82,7 +82,7 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) bufs + num_rx_total, nb_pkts); num_rx_total += num_rx_slave; nb_pkts -= num_rx_slave; - if (++active_slave == slave_count) + if (++active_slave >= slave_count) active_slave = 0; } -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:04.939545804 +0100 +++ 0004-net-bonding-fix-array-overflow-in-Rx-burst.patch 2022-11-11 12:35:04.705191687 +0100 @@ -1 +1 @@ -From 007c5450dfa094f7e07ebee3610bcb3494ef842c Mon Sep 17 00:00:00 2001 +From 10754b6858235bfc341d437009526c705fdbf988 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 007c5450dfa094f7e07ebee3610bcb3494ef842c ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index cd80a0af46..02c96f697d 100644 +index d6dbd2fb8a..c8bd7064ce 100644