Re: [PATCH net] net: socket: add check for negative optlen in compat setsockopt

2019-02-22 Thread David Miller
From: Jann Horn Date: Wed, 20 Feb 2019 22:34:54 +0100 > __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 Hor

[PATCH net] net: socket: add check for negative optlen in compat setsockopt

2019-02-20 Thread Jann Horn
__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 --- net/compat.c | 6 +- 1 file changed, 5 insertions(+),