Eric Dumazet
ed0dfffd7d
udp: fix potential infinite loop in SO_REUSEPORT logic
...
Using a combination of connected and un-connected sockets, Dmitry
was able to trigger soft lockups with his fuzzer.
The problem is that sockets in the SO_REUSEPORT array might have
different scores.
Right after sk2=socket(), setsockopt(sk2,...,SO_REUSEPORT, on) and
bind(sk2, ...), but _before_ the connect(sk2) is done, sk2 is added into
the soreuseport array, with a score which is smaller than the score of
first socket sk1 found in hash table (I am speaking of the regular UDP
hash table), if sk1 had the connect() done, giving a +8 to its score.
hash bucket [X] -> sk1 -> sk2 -> NULL
sk1 score = 14 (because it did a connect())
sk2 score = 6
SO_REUSEPORT fast selection is an optimization. If it turns out the
score of the selected socket does not match score of first socket, just
fallback to old SO_REUSEPORT logic instead of trying to be too smart.
Normal SO_REUSEPORT users do not mix different kind of sockets, as this
mechanism is used for load balance traffic.
Fixes: e32ea7e747 ("soreuseport: fast reuseport UDP socket selection")
Reported-by: Dmitry Vyukov <[email protected] >
Signed-off-by: Eric Dumazet <[email protected] >
Cc: Craig Gallek <[email protected] >
Acked-by: Craig Gallek <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
2016-01-19 13:52:25 -05:00
..
6lowpan
6lowpan: fix debugfs interface entry name
2015-12-20 08:21:00 +01:00
9p
... and a couple in net/9p
2016-01-04 10:29:17 -05:00
802
8021q
net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK
2015-12-15 16:50:08 -05:00
appletalk
atm
net: Generalise wq_has_sleeper helper
2015-11-30 14:47:33 -05:00
ax25
net: add validation for the socket syscall protocol argument
2015-12-14 16:09:30 -05:00
batman-adv
batman-adv: Drop immediate orig_node free function
2016-01-16 22:50:00 +08:00
bluetooth
Bluetooth: avoid rebuilding hci_sock all the time
2016-01-06 16:36:44 +01:00
bridge
bridge: fix lockdep addr_list_lock false positive splat
2016-01-15 15:40:45 -05:00
caif
net: rename SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA
2015-12-01 15:45:05 -05:00
can
ceph
core
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-01-15 13:33:12 -08:00
dcb
dccp
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-12-03 21:09:12 -05:00
decnet
net: add validation for the socket syscall protocol argument
2015-12-14 16:09:30 -05:00
dns_resolver
dsa
dsa: Register netdev before phy
2016-01-07 14:31:26 -05:00
ethernet
net: Add eth_platform_get_mac_address() helper.
2016-01-06 16:31:56 -05:00
hsr
ieee802154
inet: kill unused skb_free op
2016-01-05 22:25:57 -05:00
ipv4
udp: fix potential infinite loop in SO_REUSEPORT logic
2016-01-19 13:52:25 -05:00
ipv6
udp: fix potential infinite loop in SO_REUSEPORT logic
2016-01-19 13:52:25 -05:00
ipx
irda
net: add validation for the socket syscall protocol argument
2015-12-14 16:09:30 -05:00
iucv
iucv: call skb_linearize() when needed
2015-12-14 16:16:44 -05:00
key
l2tp
l2tp: rely on ppp layer for skb scrubbing
2016-01-04 16:45:24 -05:00
l3mdev
lapb
llc
mac80211
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-12-17 22:08:28 -05:00
mac802154
mac802154: constify ieee802154_llsec_ops structure
2016-01-04 20:40:41 +01:00
mpls
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-12-17 22:08:28 -05:00
netfilter
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
2016-01-08 20:53:16 -05:00
netlabel
netlink
genetlink: Fix off-by-one in genl_allocate_reserve_groups()
2016-01-13 10:28:06 -05:00
netrom
nfc
NFC 4.5 pull request
2016-01-04 21:48:15 -05:00
openvswitch
ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack
2016-01-18 12:09:45 -05:00
packet
packet: Allow packets with only a header (but no payload)
2015-11-29 22:17:17 -05:00
phonet
phonet: properly unshare skbs in phonet_rcv()
2016-01-12 12:05:38 -05:00
rds
RDS: don't pretend to use cpu notifiers
2015-12-22 15:23:05 -05:00
rfkill
Bluetooth: hci_bcm: move all Broadcom ACPI IDs to BCM HCI driver
2016-01-04 19:22:05 +01:00
rose
rxrpc
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2016-01-12 18:57:02 -08:00
sched
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-01-11 23:55:43 -05:00
sctp
sctp: the temp asoc's transports should not be hashed/unhashed
2016-01-17 19:11:44 -05:00
sunrpc
Smaller bugfixes and cleanup, including a fix for a failures of
2016-01-15 12:49:44 -08:00
switchdev
switchdev: Adding MDB entry offload
2016-01-10 16:50:20 -05:00
tipc
ip_tunnel: Move stats update to iptunnel_xmit()
2015-12-25 23:32:23 -05:00
unix
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2016-01-11 23:55:43 -05:00
vmw_vsock
Revert "Merge branch 'vsock-virtio'"
2015-12-08 21:55:49 -05:00
wimax
wireless
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2015-12-17 22:08:28 -05:00
x25
xfrm
net: preserve IP control block during GSO segmentation
2016-01-15 14:35:24 -05:00
compat.c
Kconfig
net, sched: add clsact qdisc
2016-01-10 22:13:15 -05:00
Makefile
socket.c
kmemcg: account certain kmem allocations to memcg
2016-01-14 16:00:49 -08:00
sysctl_net.c