syzbot


KCSAN: data-race in unix_notinflight / wait_for_unix_gc (3)

Status: auto-closed as invalid on 2021/10/11 14:18
Subsystems: net
[Documentation on labels]
First crash: 1009d, last: 956d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in unix_notinflight / wait_for_unix_gc net 2 1638d 1638d 0/26 closed as invalid on 2019/11/19 13:44
upstream KCSAN: data-race in unix_notinflight / wait_for_unix_gc (2) net 1 1603d 1603d 0/26 auto-closed as invalid on 2020/02/08 02:47

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

write to 0xffffffff841ab1d4 of 4 bytes by task 11093 on cpu 0:
 unix_notinflight+0x1f2/0x280 net/unix/scm.c:83
 unix_detach_fds net/unix/scm.c:134 [inline]
 unix_destruct_scm+0xb2/0x190 net/unix/scm.c:145
 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
 __skb_queue_purge include/linux/skbuff.h:2831 [inline]
 unix_gc+0x7d7/0x8d0 net/unix/garbage.c:296
 unix_release_sock+0x644/0x6f0 net/unix/af_unix.c:606
 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

read to 0xffffffff841ab1d4 of 4 bytes by task 11095 on cpu 1:
 wait_for_unix_gc+0x24/0x140 net/unix/garbage.c:196
 unix_dgram_sendmsg+0x5f/0x1620 net/unix/af_unix.c:1735
 unix_seqpacket_sendmsg+0xcc/0x110 net/unix/af_unix.c:2221
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 ____sys_sendmsg+0x360/0x4d0 net/socket.c:2409
 ___sys_sendmsg net/socket.c:2463 [inline]
 __sys_sendmsg+0x1ed/0x270 net/socket.c:2492
 __do_sys_sendmsg net/socket.c:2501 [inline]
 __se_sys_sendmsg net/socket.c:2499 [inline]
 __x64_sys_sendmsg+0x42/0x50 net/socket.c:2499
 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

value changed: 0x00000002 -> 0x00000001

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

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/06 14:11 upstream 27151f177827 6ca60148 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in unix_notinflight / wait_for_unix_gc
2021/08/05 15:55 upstream 251a1524293d d2d6e680 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in unix_notinflight / wait_for_unix_gc
2021/08/01 04:30 upstream f3438b4c4e69 6c236867 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in unix_notinflight / wait_for_unix_gc
2021/07/15 12:26 upstream 8096acd7442e b9a2f64e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in unix_notinflight / wait_for_unix_gc
* Struck through repros no longer work on HEAD.