Skip to content
Commit 74da7792 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski
Browse files

net/tcp_sigpool: Fix some off by one bugs

The "cpool_populated" variable is the number of elements in the cpool[]
array that have been populated.  It is incremented in
tcp_sigpool_alloc_ahash() every time we populate a new element.
Unpopulated elements are NULL but if we have populated every element then
this code will read one element beyond the end of the array.

Fixes: 8c73b263

 ("net/tcp: Prepare tcp_md5sig_pool for TCP-AO")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarDmitry Safonov <dima@arista.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/ce915d61-04bc-44fb-b450-35fcc9fc8831@moroto.mountain
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 19b3f72a
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