kernel_optimize_test/net/core
Eric Dumazet b98b0bc8c4 net: avoid signed overflows for SO_{SND|RCV}BUFFORCE
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 8298193012 ("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 <edumazet@google.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-02 14:10:14 -05:00
..
datagram.c
dev_addr_lists.c
dev_ioctl.c
dev.c bpf: Fix bpf_redirect to an ipip/ip6tnl dev 2016-11-12 23:38:07 -05:00
devlink.c
drop_monitor.c
dst_cache.c
dst.c
ethtool.c net: ethtool: don't require CAP_NET_ADMIN for ETHTOOL_GLINKSETTINGS 2016-11-25 20:23:30 -05:00
fib_rules.c
filter.c bpf: Fix bpf_redirect to an ipip/ip6tnl dev 2016-11-12 23:38:07 -05:00
flow_dissector.c flow_dissect: call init_default_flow_dissectors() earlier 2016-11-22 14:44:01 -05:00
flow.c flowcache: Increase threshold for refusing new allocations 2016-11-23 06:37:09 +01:00
gen_estimator.c
gen_stats.c
hwbm.c
link_watch.c
lwtunnel.c
Makefile
neighbour.c
net_namespace.c net: check dead netns for peernet2id_alloc() 2016-11-17 11:19:40 -05:00
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
pktgen.c net: pktgen: remove rcu locking in pktgen_change_name() 2016-10-17 10:52:59 -04:00
ptp_classifier.c
request_sock.c
rtnetlink.c net/rtnetlink: fix attribute name in nlmsg_size() comments 2016-12-02 10:34:59 -05:00
scm.c
secure_seq.c
skbuff.c Merge branch 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-07 15:36:58 -07:00
sock_diag.c
sock_reuseport.c soreuseport: do not export reuseport_add_sock() 2016-10-18 14:18:23 -04:00
sock.c net: avoid signed overflows for SO_{SND|RCV}BUFFORCE 2016-12-02 14:10:14 -05:00
stream.c net: do not export sk_stream_write_space 2016-09-28 20:32:38 -04:00
sysctl_net_core.c
timestamping.c
tso.c
utils.c