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: 429d, last: 11h57m
Similar bugs (11)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (4) fs 6 1 1825d 1825d 0/29 auto-closed as invalid on 2020/09/26 10:37
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (10) fs 6 1 906d 906d 0/29 auto-obsoleted due to no activity on 2023/04/24 02:17
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async fs 6 1 1982d 1982d 0/29 auto-closed as invalid on 2020/05/26 22:23
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (5) fs 6 3 1551d 1588d 0/29 auto-closed as invalid on 2021/06/26 18:07
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (8) fs 6 1 1248d 1248d 0/29 auto-closed as invalid on 2022/04/26 03:12
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (6) fs 6 2 1348d 1375d 0/29 auto-closed as invalid on 2022/01/16 09:31
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (2) fs 6 1 1908d 1908d 0/29 closed as invalid on 2020/06/18 14:13
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (9) fs 6 2 1032d 1038d 0/29 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 6 1 812d 812d 0/29 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 6 1 1877d 1877d 0/29 auto-closed as invalid on 2020/08/05 10:16
upstream KCSAN: data-race in fasync_remove_entry / sock_wake_async (7) fs 6 1 1293d 1293d 0/29 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 0xffff888119826a98 of 8 bytes by task 5156 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 0xffff888119826a98 of 8 bytes by task 5155 on cpu 0:
 sock_wake_async+0x29/0x110 net/socket.c:1479
 sk_wake_async_rcu include/net/sock.h:2527 [inline]
 unix_write_space+0x13b/0x140 net/unix/af_unix.c:607
 sock_wfree+0x148/0x3c0 net/core/sock.c:2666
 unix_destruct_scm+0xc3/0xf0 net/unix/af_unix.c:2001
 skb_release_head_state+0xb7/0x1a0 net/core/skbuff.c:1138
 skb_release_all net/core/skbuff.c:1149 [inline]
 __kfree_skb+0x18/0x150 net/core/skbuff.c:1165
 sk_skb_reason_drop+0xbd/0x270 net/core/skbuff.c:1203
 kfree_skb_reason include/linux/skbuff.h:1275 [inline]
 unix_release_sock+0x64a/0x790 net/unix/af_unix.c:726
 unix_release+0x58/0x80 net/unix/af_unix.c:1196
 __sock_release net/socket.c:649 [inline]
 sock_close+0x6b/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: 0xffff88811a142cf0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5155 Comm: syz.4.625 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (34):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/21 03:14 upstream 41cd3fd15263 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/08/19 20:00 upstream b19a97d57c15 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/08/18 18:16 upstream c17b750b3ad9 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/07/23 19:10 upstream 01a412d06bc5 e1dd4f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/07/15 11:03 upstream 155a3c003e55 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/05/26 05:01 upstream 0f8c0258bf04 2d4582d0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/05/24 01:33 upstream eccf6f2f6ab9 f8cc0c83 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/05/22 02:20 upstream d608703fcdd9 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/05/15 21:00 upstream 088d13246a46 cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/05/14 19:12 upstream 9f35e33144ae a4fa04ef .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/04/15 07:20 upstream 8ffd015db85f 0bd6db41 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/02/26 11:29 upstream ac9c34d1e45a d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/01/26 20:15 upstream aa22f4da2a46 9fbd772e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/01/18 09:17 upstream 595523945be0 f2cb035c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fasync_remove_entry / sock_wake_async
2025/01/10 09:49 upstream 643e2e259c2b 67d7ec0a .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/12/31 16:41 upstream ccb98ccef0e5 d3ccff63 .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/12/30 20:20 upstream fc033cf25e61 d3ccff63 .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/12/28 20:29 upstream fd0584d220fe d3ccff63 .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/12/25 09:20 upstream 9b2ffa6148b1 444551c4 .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/10/30 13:19 upstream c1e939a21eb1 fb888278 .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/09/26 23:44 upstream 11a299a7933e 9314348a .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/09/12 08:02 upstream 7c6a3a65ace7 d94c83d8 .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/09/04 08:01 upstream 88fac17500f4 9d47f20a .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/08/07 18:47 upstream 6a0e38264012 109d2082 .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/30 17:08 upstream 94ede2a3e913 6fde257d .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/30 13:09 upstream 94ede2a3e913 5187fc86 .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/23 23:56 upstream 28bbe4ea686a e50e8da5 .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/20 09:27 upstream 3c3ff7be9729 b88348e9 .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/16 16:01 upstream d67978318827 b66b37bd .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/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.