syzbot


KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock (5)

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: f13ef10059cc net: annotate data race in sock_error()
First crash: 668d, last: 449d
similar bugs (7):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock (6) 1 427d 427d 0/24 auto-closed as invalid on 2022/01/05 01:52
upstream KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock 2 1109d 1124d 0/24 auto-closed as invalid on 2020/03/29 01:10
upstream KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock (8) 1 328d 328d 0/24 auto-closed as invalid on 2022/04/14 22:36
upstream KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock (4) 20 750d 782d 0/24 auto-closed as invalid on 2021/02/16 06:00
upstream KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock (7) 1 380d 377d 0/24 auto-closed as invalid on 2022/02/21 00:16
upstream KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock (3) 1 914d 914d 0/24 auto-closed as invalid on 2020/09/05 23:08
upstream KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock (2) 1 951d 951d 0/24 auto-closed as invalid on 2020/07/30 12:33

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

write to 0xffff88812fda3e78 of 1 bytes by task 18724 on cpu 0:
 unix_release_sock+0x298/0x680 net/unix/af_unix.c:565
 unix_release+0x4e/0x70 net/unix/af_unix.c:949
 __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+0x8e/0x110 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+0x160/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 0xffff88812fda3e78 of 1 bytes by task 18726 on cpu 1:
 sock_alloc_send_pskb+0x113/0x4e0 net/core/sock.c:2560
 unix_stream_sendmsg+0x3da/0xf10 net/unix/af_unix.c:2064
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 ____sys_sendmsg+0x39a/0x510 net/socket.c:2409
 ___sys_sendmsg net/socket.c:2463 [inline]
 __sys_sendmsg+0x195/0x230 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+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00 -> 0x03

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

Crashes (47):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2021/11/09 02:45 upstream e851dfae4371 8ab17e57 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/11/07 07:32 upstream 512b7931ad05 4c1be0be .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/11/06 14:13 upstream fe91c4725aee 4c1be0be .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/11/02 07:04 upstream e66435936756 098b5d53 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/10/29 06:30 upstream 411a44c24a56 be531bb4 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/10/28 15:28 upstream 1fc596a56b33 be531bb4 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/10/14 06:13 upstream 348949d9a444 5462d470 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/10/07 16:29 upstream 5af4055fa813 efe0f24d .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/10/07 10:09 upstream 5af4055fa813 62ee0987 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/10/06 10:15 upstream 60a9483534ed 0a63fd36 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/10/05 02:50 upstream 84b3e42564ac ce697b49 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/10/03 17:54 upstream 7b66f4393ad4 db0f5787 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/09/27 23:45 upstream 0513e464f900 78494d16 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/09/25 00:32 upstream 7d42e9818258 8cac236e .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/09/14 08:20 upstream d0ee23f9d78b 58d09404 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/08/30 16:36 upstream 7d2a07b76933 8f58a0ef .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/08/16 10:24 upstream 7c60610d4767 6652437d .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/08/09 13:36 upstream 36a21d51725a 6972b106 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/08/07 01:05 upstream 894d6f401b21 6972b106 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/08/05 05:06 upstream 251a1524293d 7f7bb950 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/07/23 06:00 upstream 9bead1b58c4c bc5f1d88 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/07/22 08:04 upstream 7b6ae471e541 29c3f20f .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/07/18 22:01 upstream f0eb870a8422 f115ae98 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/07/18 04:03 upstream 1d67c8d993ba f115ae98 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/07/07 16:27 upstream 3dbdb38e2869 4846d5c1 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/07/06 02:02 upstream 3dbdb38e2869 55aa55c2 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/07/02 15:44 upstream 3dbdb38e2869 658ebc66 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/07/01 19:26 upstream dbe69e433722 658ebc66 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/06/19 12:29 upstream 9ed13a17e38e aba2b2fb .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/06/15 23:05 upstream 94f0b2d4a1d0 990d3cbe .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/06/10 17:12 upstream cd1245d75ce9 1ba81399 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/06/04 08:19 upstream f88cd3fb9df2 0740de69 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/31 22:47 upstream c2131f7e73c9 032639db .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/31 14:08 upstream 8124c8a6b353 032639db .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/24 12:39 upstream 6ebb6814a1ef 3c7fef33 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/18 10:27 upstream 8ac91e6c6033 a343ba6b .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/17 14:21 upstream d07f6ca923ea a2eb125d .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/16 13:40 upstream c12a29ed9094 f54a5c09 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/10 16:36 upstream 6efb943b8616 ca873091 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/08 19:44 upstream dd860052c99b bc5434be .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/05/03 15:14 upstream 9ccce092fc64 ad61f371 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/04/30 08:34 upstream 8ca5297e7e38 77e2b668 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/04/28 19:19 upstream e359bce39d90 77e2b668 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/04/22 17:15 upstream 16fc44d6387e 33c28d03 .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/04/18 13:57 upstream c98ff1d013d2 7e2b734b .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/04/07 13:13 upstream 2d743660786e 6a81331a .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
ci2-upstream-kcsan-gce 2021/04/04 19:40 upstream 2023a53bdf41 6a81331a .config console log report info KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock
* Struck through repros no longer work on HEAD.