net/bonding: fix buffer corruption in packets
authorJia Yu <jyu@vmware.com>
Mon, 20 Aug 2018 05:18:45 +0000 (22:18 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 28 Aug 2018 13:27:39 +0000 (15:27 +0200)
commit6b2a47de074a0a6abc9a7c8d1aaa2a66898b7b48
tree39be2e543f2a869cf0f553e86fe498853cafd69a
parent40d96ffbd1f61533a19f2df5673f378d166ff11a
net/bonding: fix buffer corruption in packets

When bond slave devices cannot transmit all packets in bufs array,
tx_burst callback shall merge the un-transmitted packets back to
bufs array. Recent merge logic introduced a bug which causes
invalid mbuf addresses being written to bufs array.
When caller frees the un-transmitted packets, due to invalid addresses,
application will crash.

The fix is avoid shifting mbufs, and directly write un-transmitted
packets back to bufs array.

Fixes: 09150784a776 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: Jia Yu <jyu@vmware.com>
Acked-by: Chas Williams <chas3@att.com>
drivers/net/bonding/rte_eth_bond_pmd.c