syzbot


KCSAN: data-race in unix_attach_fds / unix_notinflight

Status: auto-closed as invalid on 2022/07/15 08:12
Subsystems: net
[Documentation on labels]
First crash: 685d, last: 685d

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

read-write to 0xffffffff85a521f8 of 8 bytes by task 2920 on cpu 1:
 unix_notinflight+0x229/0x250 net/unix/scm.c:87
 unix_detach_fds net/unix/scm.c:136 [inline]
 unix_destruct_scm+0xb8/0x190 net/unix/scm.c:147
 skb_release_head_state+0xb3/0x1a0 net/core/skbuff.c:729
 skb_release_all net/core/skbuff.c:740 [inline]
 __kfree_skb+0x14/0x150 net/core/skbuff.c:756
 kfree_skb_reason+0x52/0x170 net/core/skbuff.c:778
 kfree_skb include/linux/skbuff.h:1375 [inline]
 unix_release_sock+0x55a/0x6a0 net/unix/af_unix.c:626
 unix_release+0x4e/0x70 net/unix/af_unix.c:990
 __sock_release net/socket.c:650 [inline]
 sock_close+0x6c/0x150 net/socket.c:1365
 __fput+0x292/0x510 fs/file_table.c:317
 ____fput+0x11/0x20 fs/file_table.c:350
 task_work_run+0x8e/0x110 kernel/task_work.c:177
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x124/0x130 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read to 0xffffffff85a521f8 of 8 bytes by task 2926 on cpu 0:
 too_many_unix_fds net/unix/scm.c:101 [inline]
 unix_attach_fds+0x4d/0x1f0 net/unix/scm.c:110
 unix_scm_to_skb net/unix/af_unix.c:1761 [inline]
 unix_stream_sendmsg+0x4f9/0xaa0 net/unix/af_unix.c:2158
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg net/socket.c:734 [inline]
 ____sys_sendmsg+0x38f/0x500 net/socket.c:2492
 ___sys_sendmsg net/socket.c:2546 [inline]
 __sys_sendmsg+0x197/0x230 net/socket.c:2575
 __do_sys_sendmsg net/socket.c:2584 [inline]
 __se_sys_sendmsg net/socket.c:2582 [inline]
 __x64_sys_sendmsg+0x42/0x50 net/socket.c:2582
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x0000000000000001 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2926 Comm: syz-executor.3 Not tainted 5.19.0-rc1-syzkaller-00094-g3d9f55c57bc3-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/10 08:08 upstream 3d9f55c57bc3 0d5abf15 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in unix_attach_fds / unix_notinflight
* Struck through repros no longer work on HEAD.