net/bonding: fix OOB access in other aggregator modes
authorHui Zhao <zhaohui8@huawei.com>
Thu, 21 Mar 2019 20:28:14 +0000 (21:28 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:57 +0000 (15:00 +0200)
commitdfbc596c2e1418780f77954e1859ffec9aebfe4f
treefe9fa6074a6391eb4e294c1feeab6dced5dae956
parentc28aff1e41eedd9d44c480264efbd7f4dd5cf31e
net/bonding: fix OOB access in other aggregator modes

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: Hui Zhao <zhaohui8@huawei.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
drivers/net/bonding/rte_eth_bond_8023ad.c