Eric Dumazet
18a419bad6
udp: annotate data races around unix_sk(sk)->gso_size
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 <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-01 13:23:19 -07:00
..
2021-03-24 17:52:11 -07:00
2021-06-02 14:01:55 -07:00
2021-07-01 11:21:57 -07:00
2021-06-18 11:58:03 -07:00
2021-06-18 19:47:02 -07:00
2021-06-10 14:08:09 -07:00
2021-03-30 16:54:50 -07:00
2021-06-18 19:47:02 -07:00
2021-06-26 07:12:45 +02:00
2021-05-19 00:33:40 +02:00
2021-06-25 13:13:50 +02:00
2021-06-29 10:46:23 -07:00
2021-06-29 11:28:21 -07:00
2021-06-29 15:45:27 -07:00
2021-06-30 15:51:09 -07:00
2021-07-01 13:08:18 -07:00
2021-06-01 17:01:33 -07:00
2021-06-29 11:28:21 -07:00
2021-06-02 14:01:55 -07:00
2021-01-27 17:04:12 -08:00
2021-07-01 11:29:42 -07:00
2021-04-13 14:35:02 -07:00
2021-07-01 13:08:18 -07:00
2021-06-16 12:13:01 -07:00
2021-06-03 10:59:49 +02:00
2021-01-27 17:04:12 -08:00
2021-07-01 13:23:19 -07:00
2021-07-01 13:23:19 -07:00
2021-06-12 13:06:33 -07:00
2021-06-29 11:28:21 -07:00
2021-05-26 07:03:39 +02:00
2021-06-07 14:08:30 -07:00
2021-03-28 17:56:55 -07:00
2021-06-08 16:31:25 -07:00
2021-04-27 14:16:14 -07:00
2021-06-23 18:12:00 +02:00
2021-04-06 22:42:16 +02:00
2021-04-27 14:17:00 -07:00
2021-07-01 13:08:18 -07:00
2021-06-07 14:08:30 -07:00
2021-06-29 15:45:27 -07:00
2021-06-15 11:19:04 -07:00
2021-06-29 11:28:21 -07:00
2021-05-17 19:57:08 -05:00
2021-06-29 11:28:21 -07:00
2021-07-01 11:13:10 -07:00
2021-06-30 15:51:09 -07:00
2021-03-14 15:00:43 -07:00
2021-06-29 11:28:21 -07:00
2021-06-30 15:51:09 -07:00
2021-04-20 16:44:04 -07:00
2021-03-10 12:45:15 -08:00
2021-06-30 15:51:09 -07:00
2021-06-29 15:45:27 -07:00
2021-07-01 11:47:13 -07:00
2021-06-29 11:28:21 -07:00
2021-06-29 11:28:21 -07:00
2021-06-28 11:45:29 -07:00
2021-06-28 14:09:03 -07:00
2021-06-30 15:51:09 -07:00
2021-06-29 15:45:27 -07:00
2021-06-29 11:28:21 -07:00
2021-06-30 15:51:09 -07:00
2021-06-23 13:05:09 +02:00
2021-06-10 14:08:09 -07:00
2021-06-29 15:45:27 -07:00
2021-06-30 15:51:09 -07:00
2021-06-03 15:13:56 -07:00
2021-06-11 12:55:28 -07:00
2021-05-11 13:56:16 -07:00
2021-01-27 17:03:52 -08:00
2021-07-01 13:08:18 -07:00
2021-04-12 13:27:11 -07:00