syzbot


KCSAN: data-race in tcp_disconnect / tcp_poll (7)

Status: fixed on 2023/07/01 16:05
Subsystems: net
[Documentation on labels]
Fix commit: e14cadfd80d7 tcp: add annotations around sk->sk_shutdown accesses
First crash: 455d, last: 432d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in tcp_disconnect / tcp_poll (5) net 1 739d 739d 0/27 auto-closed as invalid on 2022/07/18 21:08
upstream KCSAN: data-race in tcp_disconnect / tcp_poll (4) net 8 837d 873d 0/27 auto-closed as invalid on 2022/04/12 08:00
upstream KCSAN: data-race in tcp_disconnect / tcp_poll (6) net 1 633d 633d 0/27 auto-obsoleted due to no activity on 2022/11/01 19:29
upstream KCSAN: data-race in tcp_disconnect / tcp_poll net 2 1278d 1289d 0/27 auto-closed as invalid on 2021/01/25 19:57
upstream KCSAN: data-race in tcp_disconnect / tcp_poll (2) net 1 988d 988d 0/27 auto-closed as invalid on 2021/11/12 06:31
upstream KCSAN: data-race in tcp_disconnect / tcp_poll (3) net 4 921d 949d 0/27 auto-closed as invalid on 2022/01/18 12:46

Sample crash report:
==================================================================
BUG: KCSAN: data-race in tcp_disconnect / tcp_poll

write to 0xffff88814588582c of 1 bytes by task 3404 on cpu 1:
 tcp_disconnect+0x4d6/0xdb0 net/ipv4/tcp.c:3121
 __inet_stream_connect+0x5dd/0x6e0 net/ipv4/af_inet.c:715
 inet_stream_connect+0x48/0x70 net/ipv4/af_inet.c:727
 __sys_connect_file net/socket.c:2001 [inline]
 __sys_connect+0x19b/0x1b0 net/socket.c:2018
 __do_sys_connect net/socket.c:2028 [inline]
 __se_sys_connect net/socket.c:2025 [inline]
 __x64_sys_connect+0x41/0x50 net/socket.c:2025
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff88814588582c of 1 bytes by task 3374 on cpu 0:
 tcp_poll+0x2e6/0x7d0 net/ipv4/tcp.c:562
 sock_poll+0x253/0x270 net/socket.c:1383
 vfs_poll include/linux/poll.h:88 [inline]
 io_poll_check_events io_uring/poll.c:281 [inline]
 io_poll_task_func+0x15a/0x820 io_uring/poll.c:333
 handle_tw_list io_uring/io_uring.c:1184 [inline]
 tctx_task_work+0x1fe/0x4d0 io_uring/io_uring.c:1246
 task_work_run+0x123/0x160 kernel/task_work.c:179
 get_signal+0xe64/0xff0 kernel/signal.c:2635
 arch_do_signal_or_restart+0x89/0x2a0 arch/x86/kernel/signal.c:306
 exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297
 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x03 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3374 Comm: syz-executor.0 Not tainted 6.3.0-rc6-syzkaller-00188-g3e7bb4f24617 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/16 21:41 upstream 3e7bb4f24617 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in tcp_disconnect / tcp_poll
2023/03/25 13:14 upstream 65aca32efdcb fbf0499a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in tcp_disconnect / tcp_poll
* Struck through repros no longer work on HEAD.