Eric Dumazet
6cd9bd2a2d
udp: annotate data races around unix_sk(sk)->gso_size
commit 18a419bad6 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 <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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-25 14:36:22 +02:00
..
2020-08-10 12:06:44 -07:00
2021-04-21 13:00:56 +02:00
2021-06-30 08:47:20 -04:00
2021-04-14 08:42:05 +02:00
2020-11-13 14:24:39 -08:00
2020-09-25 13:58:01 -07:00
2021-06-23 14:42:41 +02:00
2021-06-30 08:47:20 -04:00
2021-04-14 08:42:07 +02:00
2021-07-14 16:56:14 +02:00
2021-07-14 16:56:25 +02:00
2020-03-29 22:30:57 -07:00
2020-07-28 17:42:31 -07:00
2020-06-18 20:21:51 -07:00
2020-08-26 15:58:48 -07:00
2020-10-02 19:11:11 -07:00
2021-01-12 20:18:12 +01:00
2020-08-03 15:29:44 -07:00
2021-06-23 14:42:47 +02:00
2021-06-23 14:42:46 +02:00
2021-03-30 14:31:59 +02:00
2020-11-17 16:08:36 -08:00
2020-11-23 16:32:33 -08:00
2020-10-13 18:35:29 -07:00
2020-03-30 13:45:04 -07:00
2020-08-25 06:28:02 -07:00
2021-07-19 09:44:53 +02:00
2020-08-25 06:23:59 -07:00
2020-11-09 15:39:39 -08:00
2021-07-25 14:36:19 +02:00
2021-03-17 17:06:12 +01:00
2020-07-09 12:55:37 +02:00
2021-06-18 10:00:05 +02:00
2020-06-30 12:29:39 -07:00
2020-09-10 12:25:51 -07:00
2020-08-18 16:02:16 -07:00
2020-07-10 13:54:00 -07:00
2020-10-30 12:57:39 +01:00
2021-03-17 17:06:14 +01:00
2021-06-30 08:47:20 -04:00
2020-09-24 20:15:45 -07:00
2020-03-12 22:34:48 -07:00
2020-10-15 18:42:13 -07:00
2021-07-14 16:56:32 +02:00
2020-11-10 17:42:35 -08:00
2021-04-21 13:00:57 +02:00
2020-11-17 11:03:22 -08:00
2020-03-16 18:26:54 -07:00
2020-11-18 00:12:34 +01:00
2021-05-14 09:50:46 +02:00
2020-06-25 16:08:47 -07:00
2020-02-27 18:50:19 -08:00
2020-08-24 14:35:00 -07:00
2020-07-06 13:23:03 -07:00
2020-07-06 13:23:03 -07:00
2021-07-25 14:36:21 +02:00
2021-07-25 14:36:21 +02:00
2020-10-02 19:11:11 -07:00
2021-03-30 14:31:59 +02:00
2021-07-25 14:36:21 +02:00
2021-02-03 23:28:52 +01:00
2020-08-24 17:31:20 -07:00
2021-02-03 23:28:51 +01:00
2020-03-09 22:34:58 +01:00
2020-10-13 17:11:52 -07:00
2020-07-06 13:23:03 -07:00
2020-03-16 18:26:55 -07:00
2021-07-25 14:36:21 +02:00
2020-07-09 12:51:36 +02:00
2020-08-21 15:16:11 -07:00
2020-03-12 22:34:48 -07:00
2020-07-24 15:41:54 -07:00
2021-03-17 17:06:11 +01:00
2020-07-10 13:54:00 -07:00
2020-09-28 12:50:12 -07:00
2020-07-10 13:54:00 -07:00
2021-07-25 14:36:22 +02:00
2020-07-19 18:16:41 -07:00
2020-05-06 09:40:08 +02:00
2020-05-11 15:12:27 +02:00
2020-05-06 09:40:08 +02:00
2020-10-09 12:29:48 +02:00