syzbot


KCSAN: data-race in fasync_remove_entry / sock_wake_async (12)

Status: moderation: reported on 2024/06/18 10:08
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+d7ef1d605864d2350c74@syzkaller.appspotmail.com
First crash: 25d, last: 1d21h
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (4) fs 1 1421d 1421d 0/27 auto-closed as invalid on 2020/09/26 10:37
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (10) fs 1 502d 502d 0/27 auto-obsoleted due to no activity on 2023/04/24 02:17
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async fs 1 1578d 1578d 0/27 auto-closed as invalid on 2020/05/26 22:23
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (5) fs 3 1147d 1184d 0/27 auto-closed as invalid on 2021/06/26 18:07
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (8) fs 1 844d 844d 0/27 auto-closed as invalid on 2022/04/26 03:12
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (6) fs 2 944d 971d 0/27 auto-closed as invalid on 2022/01/16 09:31
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (2) fs 1 1504d 1504d 0/27 closed as invalid on 2020/06/18 14:13
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (9) fs 2 628d 633d 0/27 auto-obsoleted due to no activity on 2022/11/28 02:38
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (11) fs 1 408d 408d 0/27 auto-obsoleted due to no activity on 2023/07/06 10:32
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (3) fs 1 1473d 1473d 0/27 auto-closed as invalid on 2020/08/05 10:16
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (7) fs 1 889d 889d 0/27 auto-closed as invalid on 2022/03/11 19:41

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

write to 0xffff888106c65a58 of 8 bytes by task 12172 on cpu 0:
 fasync_remove_entry+0xd2/0x130 fs/fcntl.c:909
 fasync_helper+0x96/0xc0 fs/fcntl.c:1008
 sock_fasync+0x60/0xd0 net/socket.c:1446
 __fput+0x68e/0x6f0 fs/file_table.c:419
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888106c65a58 of 8 bytes by task 12171 on cpu 1:
 sock_wake_async+0x2a/0x120 net/socket.c:1461
 sk_wake_async include/net/sock.h:2435 [inline]
 unix_release_sock+0x488/0x790 net/unix/af_unix.c:638
 unix_release+0x57/0x80 net/unix/af_unix.c:1043
 __sock_release net/socket.c:659 [inline]
 sock_close+0x68/0x150 net/socket.c:1421
 __fput+0x192/0x6f0 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff88812304df60 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12171 Comm: syz.1.2838 Tainted: G        W          6.10.0-rc7-syzkaller-00076-g9d9a2f29aefd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/11 13:19 upstream 9d9a2f29aefd c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2024/07/05 11:04 upstream 661e504db04c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2024/07/04 09:38 upstream 795c58e4c7fc 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2024/06/23 02:14 upstream 563a50672d8a edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2024/06/18 10:08 upstream 14d7c92f8df9 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
* Struck through repros no longer work on HEAD.