syzbot


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

Status: auto-closed as invalid on 2021/10/31 16:09
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 426d, last: 426d
similar bugs (7):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (2) 1 825d 825d 0/24 auto-closed as invalid on 2020/09/27 12:17
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (4) 1 556d 556d 0/24 auto-closed as invalid on 2021/06/23 11:06
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (5) 2 486d 488d 0/24 auto-closed as invalid on 2021/08/31 22:21
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (3) 1 708d 708d 0/24 auto-closed as invalid on 2021/01/22 14:57
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (7) 4 347d 385d 0/24 auto-closed as invalid on 2022/01/18 10:05
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync (8) 3 292d 301d 0/24 auto-closed as invalid on 2022/03/14 14:59
upstream KCSAN: data-race in fasync_remove_entry / kill_fasync 82 879d 1036d 0/24 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 0xffff888133155998 of 8 bytes by task 15134 on cpu 0:
 fasync_remove_entry+0xd9/0x180 fs/fcntl.c:895
 fasync_helper+0x92/0xc0 fs/fcntl.c:994
 sock_fasync+0x5c/0xc0 net/socket.c:1339
 __fput+0x4dd/0x520 fs/file_table.c:277
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0xae/0x130 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x156/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888133155998 of 8 bytes by task 15162 on cpu 1:
 kill_fasync+0x20/0x160 fs/fcntl.c:1033
 sock_wake_async+0xea/0x100
 sk_wake_async include/net/sock.h:2336 [inline]
 unix_write_space+0x11e/0x130 net/unix/af_unix.c:474
 sock_wfree+0xaf/0x150 net/core/sock.c:2185
 unix_destruct_scm+0x164/0x190 net/unix/scm.c:150
 skb_release_head_state+0xb3/0x170 net/core/skbuff.c:728
 skb_release_all net/core/skbuff.c:739 [inline]
 __kfree_skb+0x14/0x150 net/core/skbuff.c:755
 kfree_skb+0x4d/0x130 net/core/skbuff.c:773
 unix_release_sock+0x595/0x700 net/unix/af_unix.c:584
 unix_release+0x4e/0x70 net/unix/af_unix.c:915
 __sock_release net/socket.c:649 [inline]
 sock_close+0x6c/0x150 net/socket.c:1314
 __fput+0x295/0x520 fs/file_table.c:280
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0xae/0x130 kernel/task_work.c:164
 get_signal+0x155c/0x15d0 kernel/signal.c:2641
 arch_do_signal_or_restart+0x8c/0x280 arch/x86/kernel/signal.c:865
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x109/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffff888103a7e210 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 15162 Comm: syz-executor.0 Not tainted 5.15.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/09/26 16:02 upstream a3b397b4fffb 8cac236e .config log report info KCSAN: data-race in fasync_remove_entry / kill_fasync
* Struck through repros no longer work on HEAD.