From: Jann Horn Date: Wed, 20 Feb 2019 21:34:54 +0000 (+0100) Subject: net: socket: add check for negative optlen in compat setsockopt X-Git-Tag: v5.0-rc8~2^2~15 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=commitdiff_plain;h=52baf9878b65872a7fc735d7fae3350ea9f30646;hp=52baf9878b65872a7fc735d7fae3350ea9f30646 net: socket: add check for negative optlen in compat setsockopt __sys_setsockopt() already checks for `optlen < 0`. Add an equivalent check to the compat path for robustness. This has to be `> INT_MAX` instead of `< 0` because the signedness of `optlen` is different here. Signed-off-by: Jann Horn Signed-off-by: David S. Miller ---