linux-stable/drivers/net/netdevsim
Colin Ian King c02462d8a3 netdevsim: fix sa_idx out of bounds check
Currently if sa_idx is equal to NSIM_IPSEC_MAX_SA_COUNT then
an out-of-bounds read on ipsec->sa will occur. Fix the
incorrect bounds check by using >= rather than >.

Detected by CoverityScan, CID#1470226 ("Out-of-bounds-read")

Fixes: 7699353da8 ("netdevsim: add ipsec offload testing")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-07-02 20:35:33 +09:00
..
bpf.c netdevsim: fix overflow on the error path 2018-02-01 11:22:51 +01:00
devlink.c netdevsim: Add extack error message for devlink reload 2018-06-05 12:32:37 -04:00
fib.c netdevsim: Add extack error message for devlink reload 2018-06-05 12:32:37 -04:00
ipsec.c netdevsim: fix sa_idx out of bounds check 2018-07-02 20:35:33 +09:00
Makefile netdevsim: add ipsec offload testing 2018-06-28 16:10:08 +09:00
netdev.c netdevsim: add ipsec offload testing 2018-06-28 16:10:08 +09:00
netdevsim.h netdevsim: add ipsec offload testing 2018-06-28 16:10:08 +09:00