Eric Dumazet
d2f7b384a7
udp: annotate data races around unix_sk(sk)->gso_size
commit 18a419bad63b7f68a1979e28459782518e7b6bbe upstream.
Accesses to unix_sk(sk)->gso_size are lockless.
Add READ_ONCE()/WRITE_ONCE() around them.
BUG: KCSAN: data-race in udp_lib_setsockopt / udpv6_sendmsg
write to 0xffff88812d78f47c of 2 bytes by task 10849 on cpu 1:
udp_lib_setsockopt+0x3b3/0x710 net/ipv4/udp.c:2696
udpv6_setsockopt+0x63/0x90 net/ipv6/udp.c:1630
sock_common_setsockopt+0x5d/0x70 net/core/sock.c:3265
__sys_setsockopt+0x18f/0x200 net/socket.c:2104
__do_sys_setsockopt net/socket.c:2115 [inline]
__se_sys_setsockopt net/socket.c:2112 [inline]
__x64_sys_setsockopt+0x62/0x70 net/socket.c:2112
do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
entry_SYSCALL_64_after_hwframe+0x44/0xae
read to 0xffff88812d78f47c of 2 bytes by task 10852 on cpu 0:
udpv6_sendmsg+0x161/0x16b0 net/ipv6/udp.c:1299
inet6_sendmsg+0x5f/0x80 net/ipv6/af_inet6.c:642
sock_sendmsg_nosec net/socket.c:654 [inline]
sock_sendmsg net/socket.c:674 [inline]
____sys_sendmsg+0x360/0x4d0 net/socket.c:2337
___sys_sendmsg net/socket.c:2391 [inline]
__sys_sendmmsg+0x315/0x4b0 net/socket.c:2477
__do_sys_sendmmsg net/socket.c:2506 [inline]
__se_sys_sendmmsg net/socket.c:2503 [inline]
__x64_sys_sendmmsg+0x53/0x60 net/socket.c:2503
do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
entry_SYSCALL_64_after_hwframe+0x44/0xae
value changed: 0x0000 -> 0x0005
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10852 Comm: syz-executor.0 Not tainted 5.13.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Fixes: bec1f6f697 ("udp: generate gso with UDP_SEGMENT")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Willem de Bruijn <[email protected]>
Reported-by: syzbot <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
2021-07-25 14:35:15 +02:00 |
| .. |
|
6lowpan
|
|
|
|
9p
|
|
|
|
802
|
|
|
|
8021q
|
|
|
|
appletalk
|
|
|
|
atm
|
|
|
|
ax25
|
|
|
|
batman-adv
|
batman-adv: Avoid WARN_ON timing related checks
|
2021-06-23 14:41:23 +02:00 |
|
bluetooth
|
Bluetooth: Shutdown controller after workqueues are flushed or cancelled
|
2021-07-19 08:53:13 +02:00 |
|
bpf
|
|
|
|
bpfilter
|
bpfilter: Specify the log level for the kmsg message
|
2021-07-14 16:53:33 +02:00 |
|
bridge
|
net: bridge: sync fdb to new unicast-filtering ports
|
2021-07-25 14:35:14 +02:00 |
|
caif
|
net: caif: fix memory leak in cfusbl_device_notify
|
2021-06-10 13:37:10 +02:00 |
|
can
|
can: j1939: j1939_sk_init(): set SOCK_RCU_FREE to call sk_destruct() after RCU is done
|
2021-07-14 16:53:04 +02:00 |
|
ceph
|
|
|
|
core
|
net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT
|
2021-07-19 08:53:08 +02:00 |
|
dcb
|
|
|
|
dccp
|
|
|
|
decnet
|
|
|
|
dns_resolver
|
|
|
|
dsa
|
net: dsa: fix error code getting shifted with 4 in dsa_slave_get_sset_count
|
2021-06-03 08:59:12 +02:00 |
|
ethernet
|
|
|
|
hsr
|
|
|
|
ieee802154
|
net: ieee802154: fix null deref in parse dev addr
|
2021-06-18 09:58:57 +02:00 |
|
ife
|
|
|
|
ipv4
|
udp: annotate data races around unix_sk(sk)->gso_size
|
2021-07-25 14:35:15 +02:00 |
|
ipv6
|
udp: annotate data races around unix_sk(sk)->gso_size
|
2021-07-25 14:35:15 +02:00 |
|
iucv
|
|
|
|
kcm
|
|
|
|
key
|
|
|
|
l2tp
|
|
|
|
l3mdev
|
|
|
|
lapb
|
|
|
|
llc
|
|
|
|
mac80211
|
mac80211: remove iwlwifi specific workaround NDPs of null_response
|
2021-07-14 16:53:32 +02:00 |
|
mac802154
|
|
|
|
mpls
|
|
|
|
ncsi
|
|
|
|
netfilter
|
netfilter: ctnetlink: suspicious RCU usage in ctnetlink_dump_helpinfo
|
2021-07-25 14:35:14 +02:00 |
|
netlabel
|
netlabel: Fix memory leak in netlbl_mgmt_add_common
|
2021-07-14 16:53:29 +02:00 |
|
netlink
|
netlink: disable IRQs for netlink_lock_table()
|
2021-06-16 11:59:34 +02:00 |
|
netrom
|
|
|
|
nfc
|
net/nfc/rawsock.c: fix a permission check bug
|
2021-06-16 11:59:33 +02:00 |
|
nsh
|
|
|
|
openvswitch
|
openvswitch: meter: fix race when getting now_ms.
|
2021-06-03 08:59:13 +02:00 |
|
packet
|
net/packet: annotate accesses to po->ifindex
|
2021-06-30 08:47:48 -04:00 |
|
phonet
|
|
|
|
psample
|
|
|
|
qrtr
|
net: qrtr: fix OOB Read in qrtr_endpoint_post
|
2021-06-23 14:41:25 +02:00 |
|
rds
|
net: rds: fix memory leak in rds_recvmsg
|
2021-06-23 14:41:24 +02:00 |
|
rfkill
|
|
|
|
rose
|
|
|
|
rxrpc
|
|
|
|
sched
|
net/sched: act_ct: fix err check for nf_conntrack_confirm
|
2021-07-25 14:35:14 +02:00 |
|
sctp
|
sctp: add size validation when walking chunks
|
2021-07-19 08:53:13 +02:00 |
|
smc
|
Revert "net/smc: fix a NULL pointer dereference"
|
2021-06-03 08:59:08 +02:00 |
|
strparser
|
|
|
|
sunrpc
|
SUNRPC: Should wake up the privileged task firstly.
|
2021-07-14 16:53:05 +02:00 |
|
switchdev
|
|
|
|
tipc
|
tipc: fix unique bearer names sanity check
|
2021-06-10 13:37:08 +02:00 |
|
tls
|
tls: prevent oversized sendfile() hangs by ignoring MSG_MORE
|
2021-07-14 16:53:31 +02:00 |
|
unix
|
net/af_unix: fix a data-race in unix_dgram_sendmsg / unix_release_sock
|
2021-06-23 14:41:26 +02:00 |
|
vmw_vsock
|
vsock: notify server to shutdown when client has pending signal
|
2021-07-19 08:53:12 +02:00 |
|
wimax
|
|
|
|
wireless
|
wireless: wext-spy: Fix out-of-bounds warning
|
2021-07-19 08:53:12 +02:00 |
|
x25
|
net/x25: Return the correct errno code
|
2021-06-18 09:59:00 +02:00 |
|
xdp
|
xsk: Simplify detection of empty and full rings
|
2021-05-22 11:38:27 +02:00 |
|
xfrm
|
xfrm: Fix error reporting in xfrm_state_construct.
|
2021-07-19 08:53:11 +02:00 |
|
compat.c
|
net: Return the correct errno code
|
2021-06-18 09:59:00 +02:00 |
|
Kconfig
|
|
|
|
Makefile
|
|
|
|
socket.c
|
net: make get_net_ns return error if NET_NS is disabled
|
2021-06-23 14:41:25 +02:00 |
|
sysctl_net.c
|
|
|