syzbot


KCSAN: data-race in __sys_connect / fasync_insert_entry

Status: moderation: reported on 2024/09/22 04:54
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+4ed17efc2052634b5d7c@syzkaller.appspotmail.com
First crash: 6d10h, last: 6d10h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __sys_connect / fasync_insert_entry

read-write to 0xffff88811f382e70 of 4 bytes by task 20740 on cpu 1:
 fasync_insert_entry+0x124/0x150 fs/fcntl.c:1063
 fasync_add_entry fs/fcntl.c:1090 [inline]
 fasync_helper+0x5d/0xc0 fs/fcntl.c:1108
 sock_fasync+0x5a/0xc0 net/socket.c:1452
 setfl fs/fcntl.c:77 [inline]
 do_fcntl+0xb8d/0xd70 fs/fcntl.c:473
 __do_sys_fcntl fs/fcntl.c:586 [inline]
 __se_sys_fcntl+0xbf/0x1b0 fs/fcntl.c:571
 __x64_sys_fcntl+0x43/0x50 fs/fcntl.c:571
 x64_sys_call+0x209e/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:73
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811f382e70 of 4 bytes by task 20738 on cpu 0:
 __sys_connect_file net/socket.c:2068 [inline]
 __sys_connect+0x18b/0x1b0 net/socket.c:2084
 __do_sys_connect net/socket.c:2094 [inline]
 __se_sys_connect net/socket.c:2091 [inline]
 __x64_sys_connect+0x41/0x50 net/socket.c:2091
 x64_sys_call+0x2220/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:43
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000002 -> 0x00042002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 20738 Comm: syz.4.5798 Tainted: G        W          6.11.0-syzkaller-07983-g7856a565416e #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/22 04:53 upstream 7856a565416e 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __sys_connect / fasync_insert_entry
* Struck through repros no longer work on HEAD.