syzbot


KCSAN: data-race in unix_notinflight / unix_release_sock

Status: auto-closed as invalid on 2021/10/09 20:56
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 447d, last: 447d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in unix_notinflight / unix_release_sock (2) 1 350d 350d 0/24 auto-closed as invalid on 2022/01/15 07:41

Sample crash report:
==================================================================
BUG: KCSAN: data-race in unix_notinflight / unix_release_sock

write to 0xffffffff841a9094 of 4 bytes by task 31332 on cpu 0:
 unix_notinflight+0x1f2/0x280 net/unix/scm.c:83
 unix_detach_fds+0x94/0x120 net/unix/scm.c:134
 unix_stream_read_generic+0xfa6/0x1570 net/unix/af_unix.c:2711
 unix_stream_recvmsg+0x63/0x90 net/unix/af_unix.c:2798
 ____sys_recvmsg+0x15d/0x310 include/linux/uio.h:240
 ___sys_recvmsg net/socket.c:2670 [inline]
 do_recvmmsg+0x35c/0x9f0 net/socket.c:2764
 __sys_recvmmsg net/socket.c:2843 [inline]
 __do_sys_recvmmsg net/socket.c:2866 [inline]
 __se_sys_recvmmsg net/socket.c:2859 [inline]
 __x64_sys_recvmmsg+0xcf/0x150 net/socket.c:2859
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffffff841a9094 of 4 bytes by task 31323 on cpu 1:
 unix_release_sock+0x627/0x6f0 net/unix/af_unix.c:605
 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
 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:209
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302
 do_syscall_64+0x49/0x90 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 31323 Comm: syz-executor.5 Tainted: G        W         5.14.0-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/04 20:54 upstream a9c9a6f741cd d236a457 .config log report info KCSAN: data-race in unix_notinflight / unix_release_sock
* Struck through repros no longer work on HEAD.