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: 51d, last: 44d
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 1877d 1877d 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 838d 838d 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 338d 338d 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 1608d 1608d 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 1538d 1540d 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 1057d 1057d 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 272d 272d 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 1759d 1759d 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 421d 450d 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 1477d 1477d 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 1399d 1437d 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 1343d 1353d 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 1931d 2088d 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 0xffff8881005b7458 of 8 bytes by task 29140 on cpu 1:
 fasync_remove_entry+0xcc/0x120 fs/fcntl.c:1005
 fasync_helper+0x97/0xc0 fs/fcntl.c:1104
 sock_fasync+0x58/0xc0 net/socket.c:1464
 __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 0xffff8881005b7458 of 8 bytes by task 29138 on cpu 0:
 kill_fasync+0x22/0x170 fs/fcntl.c:1146
 sock_wake_async+0xed/0x110 net/socket.c:-1
 sk_wake_async include/net/sock.h:2519 [inline]
 unix_release_sock+0x4b5/0x790 net/unix/af_unix.c:712
 unix_release+0x58/0x80 net/unix/af_unix.c:1196
 __sock_release net/socket.c:649 [inline]
 sock_close+0x68/0x150 net/socket.c:1439
 __fput+0x298/0x650 fs/file_table.c:468
 ____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

value changed: 0xffff888118e02bd0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 29138 Comm: syz.6.8798 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 (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/30 06:06 upstream fb679c832b64 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / kill_fasync
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.