syzbot


KCSAN: data-race in ____sys_recvmsg / fasync_insert_entry (2)

Status: moderation: reported on 2024/07/01 10:44
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+854f341cab090c873189@syzkaller.appspotmail.com
First crash: 12d, last: 12d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ____sys_recvmsg / fasync_insert_entry fs 1 1186d 1186d 0/27 auto-closed as invalid on 2021/05/18 14:22

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

read-write to 0xffff888100ee0048 of 4 bytes by task 22242 on cpu 1:
 fasync_insert_entry+0x124/0x150 fs/fcntl.c:964
 fasync_add_entry fs/fcntl.c:991 [inline]
 fasync_helper+0x5d/0xc0 fs/fcntl.c:1009
 sock_fasync+0x60/0xd0 net/socket.c:1446
 setfl fs/fcntl.c:75 [inline]
 do_fcntl+0xc0b/0xe20 fs/fcntl.c:375
 __do_sys_fcntl fs/fcntl.c:492 [inline]
 __se_sys_fcntl+0xc4/0x190 fs/fcntl.c:477
 __x64_sys_fcntl+0x43/0x50 fs/fcntl.c:477
 x64_sys_call+0x292f/0x2d70 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 0xffff888100ee0048 of 4 bytes by task 22237 on cpu 0:
 ____sys_recvmsg+0xc8/0x280 net/socket.c:2798
 ___sys_recvmsg net/socket.c:2846 [inline]
 do_recvmmsg+0x2eb/0x720 net/socket.c:2940
 __sys_recvmmsg net/socket.c:3019 [inline]
 __do_sys_recvmmsg net/socket.c:3042 [inline]
 __se_sys_recvmmsg net/socket.c:3035 [inline]
 __x64_sys_recvmmsg+0xe2/0x170 net/socket.c:3035
 x64_sys_call+0x271d/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:300
 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 -> 0x00002c02

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 22237 Comm: syz.0.5839 Not tainted 6.10.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/01 10:43 upstream 22a40d14b572 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ____sys_recvmsg / fasync_insert_entry
* Struck through repros no longer work on HEAD.