syzbot


KCSAN: data-race in init_file / prepare_creds (2)

Status: moderation: reported on 2025/07/27 03:30
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+0873b15fae924aab48d4@syzkaller.appspotmail.com
First crash: 28d, last: 21d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in init_file / prepare_creds fs 6 1 86d 86d 0/29 auto-obsoleted due to no activity on 2025/07/25 02:49

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

write to 0xffff888133135e28 of 4 bytes by task 10161 on cpu 1:
 get_cred_many include/linux/cred.h:202 [inline]
 get_cred include/linux/cred.h:218 [inline]
 init_file+0x2e/0x1d0 fs/file_table.c:158
 alloc_empty_file+0x8b/0x200 fs/file_table.c:241
 alloc_file fs/file_table.c:354 [inline]
 alloc_file_pseudo+0xc6/0x160 fs/file_table.c:383
 sock_alloc_file+0x9c/0x1e0 net/socket.c:470
 sock_map_fd net/socket.c:500 [inline]
 __sys_socket+0x116/0x180 net/socket.c:1740
 __do_sys_socket net/socket.c:1745 [inline]
 __se_sys_socket net/socket.c:1743 [inline]
 __x64_sys_socket+0x3f/0x50 net/socket.c:1743
 x64_sys_call+0x1147/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:42
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888133135d80 of 184 bytes by task 10162 on cpu 0:
 prepare_creds+0x6c/0x4c0 kernel/cred.c:219
 copy_creds+0x8f/0x3f0 kernel/cred.c:312
 copy_process+0x658/0x2000 kernel/fork.c:2036
 kernel_clone+0x16c/0x5c0 kernel/fork.c:2603
 __do_sys_clone kernel/fork.c:2746 [inline]
 __se_sys_clone kernel/fork.c:2730 [inline]
 __x64_sys_clone+0xe6/0x120 kernel/fork.c:2730
 x64_sys_call+0x119c/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:57
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 10162 Comm: syz.2.2040 Not tainted 6.16.0-syzkaller-11241-g186f3edfdd41 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/03 17:26 upstream 186f3edfdd41 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2025/07/27 03:29 upstream 302f88ff3584 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
* Struck through repros no longer work on HEAD.