syzbot


KCSAN: data-race in __alloc_file / __alloc_file

Status: auto-closed as invalid on 2020/01/19 03:08
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+3ef049d50587836c0606@syzkaller.appspotmail.com
First crash: 1703d, last: 1686d
Discussions (2)
Title Replies (including bot) Last reply
Re: KCSAN: data-race in __alloc_file / __alloc_file 47 (47) 2019/11/17 19:20
KCSAN: data-race in __alloc_file / __alloc_file 19 (20) 2019/11/09 23:08

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

write to 0xffff8880b609cd58 of 4 bytes by task 23698 on cpu 0:
 get_cred include/linux/cred.h:253 [inline]
 __alloc_file+0x74/0x210 fs/file_table.c:105
 alloc_empty_file+0x8f/0x180 fs/file_table.c:151
 alloc_file+0x4e/0x2b0 fs/file_table.c:193
 alloc_file_pseudo+0x11c/0x1b0 fs/file_table.c:232
 create_pipe_files+0x22a/0x380 fs/pipe.c:776
 __do_pipe_flags+0x51/0x180 fs/pipe.c:807
 do_pipe2+0x3f/0x150 fs/pipe.c:855
 __do_sys_pipe fs/pipe.c:878 [inline]
 __se_sys_pipe fs/pipe.c:876 [inline]
 __x64_sys_pipe+0x2a/0x40 fs/pipe.c:876
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff8880b609cd58 of 4 bytes by task 23692 on cpu 1:
 get_cred include/linux/cred.h:253 [inline]
 __alloc_file+0x74/0x210 fs/file_table.c:105
 alloc_empty_file+0x8f/0x180 fs/file_table.c:151
 alloc_file+0x4e/0x2b0 fs/file_table.c:193
 alloc_file_pseudo+0x11c/0x1b0 fs/file_table.c:232
 sock_alloc_file+0x65/0x120 net/socket.c:397
 sock_map_fd net/socket.c:420 [inline]
 __sys_socket+0xe8/0x170 net/socket.c:1515
 __do_sys_socket net/socket.c:1520 [inline]
 __se_sys_socket net/socket.c:1518 [inline]
 __x64_sys_socket+0x4c/0x60 net/socket.c:1518
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 23692 Comm: syz-executor.3 Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/10 03:07 https://github.com/google/ktsan.git kcsan 94c006602e13 dc438b91 .config console log report ci2-upstream-kcsan-gce
2019/11/07 17:22 https://github.com/google/ktsan.git kcsan 94c006602e13 f39aff9e .config console log report ci2-upstream-kcsan-gce
2019/11/07 05:16 https://github.com/google/ktsan.git kcsan 94c006602e13 d797d201 .config console log report ci2-upstream-kcsan-gce
2019/11/05 18:09 https://github.com/google/ktsan.git kcsan 94c006602e13 af5c522d .config console log report ci2-upstream-kcsan-gce
2019/11/04 23:04 https://github.com/google/ktsan.git kcsan 94c006602e13 18e12644 .config console log report ci2-upstream-kcsan-gce
2019/11/02 23:23 https://github.com/google/ktsan.git kcsan 05f2236801fe d603afc9 .config console log report ci2-upstream-kcsan-gce
2019/11/01 21:21 https://github.com/google/ktsan.git kcsan 05f2236801fe 997ccc67 .config console log report ci2-upstream-kcsan-gce
2019/10/30 21:54 https://github.com/google/ktsan.git kcsan 05f2236801fe a41ca8fa .config console log report ci2-upstream-kcsan-gce
2019/10/28 19:14 https://github.com/google/ktsan.git kcsan 05f2236801fe 439d7b14 .config console log report ci2-upstream-kcsan-gce
2019/10/26 13:45 https://github.com/google/ktsan.git kcsan 05f2236801fe 25bb509e .config console log report ci2-upstream-kcsan-gce
2019/10/26 07:29 https://github.com/google/ktsan.git kcsan 05f2236801fe 413926c5 .config console log report ci2-upstream-kcsan-gce
2019/10/24 08:17 https://github.com/google/ktsan.git kcsan 05f2236801fe d01bb02a .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.