]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: potential underflow in compat_ip_setsockopt()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 23 May 2020 17:46:48 +0000 (20:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 May 2020 00:51:28 +0000 (17:51 -0700)
commit99c539f3503dac126868135dd35c8d3938894923
tree3f24921700cd271bf6e50771ff8acafe64b1363b
parent6a446b0435f345875ad91b0a491b2dbfbe88eeff
ipv4: potential underflow in compat_ip_setsockopt()

The value of "n" is capped at 0x1ffffff but it checked for negative
values.  I don't think this causes a problem but I'm not certain and
it's harmless to prevent it.

Fixes: 5b6d191426cd ("ipv4: do compat setsockopt for MCAST_MSFILTER directly")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_sockglue.c