Skip to content
Commit 44827016 authored by Dr. David Alan Gilbert's avatar Dr. David Alan Gilbert Committed by Jakub Kicinski
Browse files

net: core: inet[46]_pton strlen len types



inet[46]_pton check the input length against
a sane length limit (INET[6]_ADDRSTRLEN), but
the strlen value gets truncated due to being stored in an int,
so there's a theoretical potential for a >4G string to pass
the limit test.
Use size_t since that's what strlen actually returns.

I've had a hunt for callers that could hit this, but
I've not managed to find anything that doesn't get checked with
some other limit first; but it's possible that I've missed
something in the depth of the storage target paths.

Signed-off-by: default avatarDr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20221029014604.114024-1-linux@treblig.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6f1a298b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment