syzbot


KCSAN: data-race in unix_release_sock / unix_seqpacket_sendmsg (2)

Status: auto-closed as invalid on 2021/03/01 18:31
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+b3b807d9ac8a2a65fbcf@syzkaller.appspotmail.com
First crash: 1484d, last: 1395d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in unix_release_sock / unix_seqpacket_sendmsg (3) net 7 1252d 1291d 0/28 auto-closed as invalid on 2021/07/23 04:04
upstream KCSAN: data-race in unix_release_sock / unix_seqpacket_sendmsg net 1 1786d 1786d 0/28 auto-closed as invalid on 2020/03/10 23:35

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

write to 0xffff888042682230 of 4 bytes by task 28625 on cpu 0:
 unix_release_sock+0x2ad/0x650 net/unix/af_unix.c:550
 unix_release+0x2f/0x50 net/unix/af_unix.c:859
 __sock_release net/socket.c:597 [inline]
 sock_close+0x6c/0x150 net/socket.c:1256
 __fput+0x24b/0x4e0 fs/file_table.c:280
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0x8e/0x110 kernel/task_work.c:140
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:174 [inline]
 exit_to_user_mode_prepare+0x16b/0x1a0 kernel/entry/common.c:201
 __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+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888042682230 of 4 bytes by task 28627 on cpu 1:
 sock_error include/net/sock.h:2242 [inline]
 unix_seqpacket_sendmsg+0x36/0x100 net/unix/af_unix.c:2044
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x352/0x4c0 net/socket.c:2345
 ___sys_sendmsg net/socket.c:2399 [inline]
 __sys_sendmmsg+0x335/0x4b0 net/socket.c:2489
 __do_sys_sendmmsg net/socket.c:2518 [inline]
 __se_sys_sendmmsg net/socket.c:2515 [inline]
 __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2515
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/01/25 18:30 upstream 6ee1d745b7c9 52e37319 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in unix_release_sock / unix_seqpacket_sendmsg
2021/01/16 05:57 upstream 5ee88057889b 65a7a854 .config console log report info ci2-upstream-kcsan-gce
2021/01/09 05:22 upstream 6279d812eab6 c104d4a3 .config console log report info ci2-upstream-kcsan-gce
2021/01/05 03:34 upstream 36bbbd0e234d 2a28ff1f .config console log report info ci2-upstream-kcsan-gce
2021/01/03 04:57 upstream 3516bd729358 79264ae3 .config console log report info ci2-upstream-kcsan-gce
2020/12/19 09:09 upstream 3644e2d2dda7 04201c06 .config console log report info ci2-upstream-kcsan-gce
2020/12/13 13:56 upstream 6bff9bb8a292 bca53db9 .config console log report info ci2-upstream-kcsan-gce
2020/12/13 02:49 upstream 7b1b868e1d91 bca53db9 .config console log report info ci2-upstream-kcsan-gce
2020/12/10 02:53 upstream ca4bbdaf1716 c090b4da .config console log report info ci2-upstream-kcsan-gce
2020/12/01 15:29 upstream b65054597872 07bfe8a5 .config console log report info ci2-upstream-kcsan-gce
2020/11/17 06:12 upstream 9c87c9f41245 1bf9a662 .config console log report info ci2-upstream-kcsan-gce
2020/11/06 14:24 upstream 521b619acdc8 cba33199 .config console log report info ci2-upstream-kcsan-gce
2020/10/28 23:35 upstream ed8780e3f2ec f24824d3 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.