]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qede: Fix out-of-bound fastpath memory access
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Sat, 29 Oct 2016 14:04:35 +0000 (17:04 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 05:00:05 +0000 (21:00 -0800)
commit56f5dd026b021b43f25e3e7354212c695a283d79
treee89463f91357d31f134bc4c0bc32617bdc197103
parent2db2a364721a0dd8ef05d3e8321156046afccee0
qede: Fix out-of-bound fastpath memory access

Orabug: 25477939

Driver allocates a shadow array for transmitted SKBs with X entries;
That means valid indices are {0,...,X - 1}. [X == 8191]
Problem is the driver also uses X as a mask for a
producer/consumer in order to choose the right entry in the
array which allows access to entry X which is out of bounds.

To fix this, simply allocate X + 1 entries in the shadow array.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 087892d29b75c025086d99b29d385a3dac0169fc)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/qlogic/qede/qede_main.c