syzbot


KCSAN: data-race in fasync_remove_entry / kill_fasync (14)

Status: moderation: reported on 2025/08/22 22:35
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+d79f3e4e547e351581df@syzkaller.appspotmail.com
First crash: 5d23h, last: 5d23h
Similar bugs (13)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (2) fs 6 1 1831d 1831d 0/29 auto-closed as invalid on 2020/09/27 12:17
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (10) fs 6 1 793d 793d 0/29 auto-obsoleted due to no activity on 2023/08/01 22:11
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (12) fs 6 1 292d 292d 0/29 auto-obsoleted due to no activity on 2025/01/04 10:04
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (4) fs 6 1 1562d 1562d 0/29 auto-closed as invalid on 2021/06/23 11:06
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (5) fs 6 2 1493d 1495d 0/29 auto-closed as invalid on 2021/08/31 22:21
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (9) fs 6 1 1012d 1012d 0/29 auto-obsoleted due to no activity on 2023/01/02 11:50
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (13) fs 6 1 226d 226d 0/29 auto-obsoleted due to no activity on 2025/03/11 12:00
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (3) fs 6 1 1714d 1714d 0/29 auto-closed as invalid on 2021/01/22 14:57
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (11) fs 6 3 376d 404d 0/29 auto-obsoleted due to no activity on 2024/09/21 19:37
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (6) fs 6 1 1432d 1432d 0/29 auto-closed as invalid on 2021/10/31 16:09
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (7) fs 6 4 1353d 1391d 0/29 auto-closed as invalid on 2022/01/18 10:05
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (8) fs 6 3 1298d 1307d 0/29 auto-closed as invalid on 2022/03/14 14:59
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync fs 6 82 1885d 2043d 0/29 auto-closed as invalid on 2020/08/04 12:11

Sample crash report:
==================================================================
BUG: KCSAN: data-race in fasync_remove_entry / kill_fasync

write to 0xffff888104a1fbd8 of 8 bytes by task 6197 on cpu 0:
 fasync_remove_entry+0xcc/0x120 fs/fcntl.c:1005
 fasync_helper+0x97/0xc0 fs/fcntl.c:1104
 pipe_fasync+0xce/0x150 fs/pipe.c:756
 __fput+0x5e3/0x650 fs/file_table.c:465
 ____fput+0x1c/0x30 fs/file_table.c:496
 task_work_run+0x131/0x1a0 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xe4/0x100 kernel/entry/common.c:43
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888104a1fbd8 of 8 bytes by task 6192 on cpu 1:
 kill_fasync+0x22/0x170 fs/fcntl.c:1146
 anon_pipe_read+0x6a2/0x750 fs/pipe.c:402
 do_iter_readv_writev+0x499/0x540 fs/read_write.c:-1
 vfs_readv+0x1ea/0x690 fs/read_write.c:1018
 do_readv+0xe7/0x210 fs/read_write.c:1080
 __do_sys_readv fs/read_write.c:1165 [inline]
 __se_sys_readv fs/read_write.c:1162 [inline]
 __x64_sys_readv+0x45/0x50 fs/read_write.c:1162
 x64_sys_call+0x29f8/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:20
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff88811a325270 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 6192 Comm: syz.4.901 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/22 22:34 upstream cf6fc5eefc5b bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / kill_fasync
* Struck through repros no longer work on HEAD.