Skip to content
Commit c02462d8 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

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: 7699353d ("netdevsim: add ipsec offload testing")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarShannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 97680ade
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment