From: Eric Dumazet Date: Fri, 2 Dec 2016 17:44:53 +0000 (-0800) Subject: net: avoid signed overflows for SO_{SND|RCV}BUFFORCE X-Git-Tag: v3.2.85~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c516724814d826ae1a90849e24e386c2ad81a845;p=pandora-kernel.git net: avoid signed overflows for SO_{SND|RCV}BUFFORCE commit b98b0bc8c431e3ceb4b26b0dfc8db509518fb290 upstream. CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since SO_SNDBUF and SO_RCVBUF were vulnerable. This needs to be backported to all known linux kernels. Again, many thanks to syzkaller team for discovering this gem. Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed