DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Cc: ferruh.yigit@intel.com, chas3@att.com, zhaohui8@huawei.com,
	stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] net/bonding: fix oob access in "other" aggregator modes
Date: Fri, 22 Mar 2019 12:18:53 +0100	[thread overview]
Message-ID: <425b9d12-8c1f-c921-440e-4fb777bfd57f@redhat.com> (raw)
Message-ID: <20190322111853.6c2RJAacy7HsWWtuJifusKCP0R6Nrt0SIXKP3JXyCOw@z> (raw)
In-Reply-To: <1553200094-5487-2-git-send-email-david.marchand@redhat.com>



On 3/21/19 9:28 PM, David Marchand wrote:
> From: Zhaohui <zhaohui8@huawei.com>
> 
> 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 <zhaohui8@huawei.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>   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;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

  parent reply	other threads:[~2019-03-22 11:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 20:28 [dpdk-dev] [PATCH 1/2] net/bonding: fix more incorrect slave id types David Marchand
2019-03-21 20:28 ` David Marchand
2019-03-21 20:28 ` [dpdk-dev] [PATCH 2/2] net/bonding: fix oob access in "other" aggregator modes David Marchand
2019-03-21 20:28   ` David Marchand
2019-03-22 11:18   ` Maxime Coquelin [this message]
2019-03-22 11:18     ` Maxime Coquelin
2019-03-24 13:35   ` Chas Williams
2019-03-24 13:35     ` Chas Williams
2019-03-24 17:11     ` David Marchand
2019-03-24 17:11       ` David Marchand
2019-03-24 17:24       ` Chas Williams
2019-03-24 17:24         ` Chas Williams
2019-03-24 18:01         ` David Marchand
2019-03-24 18:01           ` David Marchand
2019-09-30 13:49     ` Yigit, Ferruh
2019-03-22 11:18 ` [dpdk-dev] [PATCH 1/2] net/bonding: fix more incorrect slave id types Maxime Coquelin
2019-03-22 11:18   ` Maxime Coquelin
2019-09-30 13:49   ` Yigit, Ferruh
2019-03-24 13:28 ` Chas Williams
2019-03-24 13:28   ` Chas Williams
2019-03-24 17:13   ` David Marchand
2019-03-24 17:13     ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=425b9d12-8c1f-c921-440e-4fb777bfd57f@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chas3@att.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=zhaohui8@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).