Re: 答复: [dpdk-dev] [PATCH] net/bonding: fix array overflow in Rx burst

Ferruh Yigit ferruh.yigit at xilinx.com
Thu Aug 25 18:39:19 CEST 2022


On 7/20/2022 2:28 AM, humin (Q) wrote:

> -----邮件原件-----
> 发件人: wangyunjian <wangyunjian at huawei.com>
> 发送时间: 2022年7月18日 21:09
> 收件人: dev at dpdk.org
> 抄送: chas3 at att.com; humin (Q) <humin29 at huawei.com>; Huangshaozhang <huangshaozhang at huawei.com>; jilei (F) <jilei8 at huawei.com>; wangyunjian <wangyunjian at huawei.com>; stable at dpdk.org
> 主题: [dpdk-dev] [PATCH] net/bonding: fix array overflow in Rx burst
> 
> 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")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Lei Ji <jilei8 at huawei.com>
> Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 >
 > Acked-by: Min Hu (Connor) <humin29 at huawei.com>
 >

Applied to dpdk-next-net/main, thanks.


More information about the stable mailing list