From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 7875EA05D3 for ; Sun, 24 Mar 2019 14:35:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CC582BD3; Sun, 24 Mar 2019 14:35:36 +0100 (CET) Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by dpdk.org (Postfix) with ESMTP id A406014EC; Sun, 24 Mar 2019 14:35:31 +0100 (CET) Received: by mail-qt1-f195.google.com with SMTP id t28so7482704qte.6; Sun, 24 Mar 2019 06:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zUkr51fZuNovL8y+gNCjy2URcVIQjhuVER3XHlPzSiw=; b=kksrXPXsd2Kx0/jFg/ymrYTtf6+4LNO2WQhnrUNgGzvF3myzawYNg1eBNoAlf/5Zux gj0c+sKfCSuadNSbj1Px0Yco5tUFsFA/NEoAqfC+BS3yW8KnR2waHvteoid4Py4HQvFS swUbssLkadT7M00bq1EX+wyB5angpErG/umMYe0Vuv+REwC8HcYKEvPb79o9ThpYt2OJ piaXVox640F8sUDjfqrN8FwIjMj6JWs9ynwpTiRU8CIhTe8HzsCv1sPJlITVfqom7FAk RozKAltPUmLelEmPhPuLlpinwstK/fXGdxp103sgUl+31en++JzNfKSvDGz0Og2WDyxV 6Odg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zUkr51fZuNovL8y+gNCjy2URcVIQjhuVER3XHlPzSiw=; b=KRQfXQn1BIuehA57tk/0yojBNArn0v6+VmLHoiKLaFdXOumta4/o3lKrnrr/1a619f EyPzcXqFz84DBrpuP1Iubvjvx1wrx+k3cyr01eK6Ply48y+tfhSBKJ6KsvnHSbfySCSD 84aaqv4zZZwrTpYupxflaZvhXBYGEaPnamGjW/QSu7ELctSRGqG0tjyMQZyqPdOPRi0/ 97F5qXMEgy3iFXA5uQUsSwjAdkIxQUQ1Z3/qO0zB0qHIn1II20a8GM6Xf1B+JhVM0Al8 0iKh+BF4LcRWgKzGg1Wc2vYz9GselolzRUC2cuS/Xkqjj2e9za+hxxP5VRuomeZcjr95 YpjQ== X-Gm-Message-State: APjAAAUrJVmYvpGp6tLv83begfa2c63mFq3HjFHRmOLOon0UnRFXuICA 9xAA/NtYIqzAdu6pvZpavRb+Gyl0 X-Google-Smtp-Source: APXvYqyfLJw8tMHqFxCiJp7UNUeW7gnXtW2pX0a34Fz8pClce7h6uN8/DErwxYkGU6JN14YBS+Dx/A== X-Received: by 2002:ac8:371d:: with SMTP id o29mr16274145qtb.389.1553434530857; Sun, 24 Mar 2019 06:35:30 -0700 (PDT) Received: from [192.168.1.10] (pool-96-255-82-34.washdc.fios.verizon.net. [96.255.82.34]) by smtp.gmail.com with ESMTPSA id u15sm10952019qth.54.2019.03.24.06.35.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 06:35:30 -0700 (PDT) To: David Marchand , dev@dpdk.org Cc: ferruh.yigit@intel.com, chas3@att.com, zhaohui8@huawei.com, stable@dpdk.org References: <1553200094-5487-1-git-send-email-david.marchand@redhat.com> <1553200094-5487-2-git-send-email-david.marchand@redhat.com> From: Chas Williams <3chas3@gmail.com> Message-ID: <615b76a3-ea73-19b7-c1b2-9ee1862473a6@gmail.com> Date: Sun, 24 Mar 2019 09:35:29 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1553200094-5487-2-git-send-email-david.marchand@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] net/bonding: fix oob access in "other" aggregator modes 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" Have you ever experienced this problem in practice? I ask because I am considering some fixes that would limit the number of slaves to a more reasonable number (and reduce the over stack usage of the bonding driver in general). On 3/21/19 4:28 PM, David Marchand wrote: > From: Zhaohui > > 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: Zhaohui > Signed-off-by: David Marchand 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 3943ec1..5004898 100644 > --- a/drivers/net/bonding/rte_eth_bond_8023ad.c > +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c > @@ -669,8 +669,8 @@ > 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; >