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

Status: moderation: reported on 2026/07/06 21:48
Subsystems: fs
Labels: race:benign prio:low
[Documentation on labels]
Reported-by: syzbot+557fdc985d6ac3831e14@syzkaller.appspotmail.com
First crash: 64d, last: 5d08h
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
c18ffeb9 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ KCSAN: data-race in init_file / prepare_creds (3) 2026/07/08 01:55 2026/07/08 01:55 2026/07/08 02:32 93f57954
482c8da0 assessment-kcsan Benign: ✅ KCSAN: data-race in init_file / prepare_creds (3) 2026/07/06 21:48 2026/07/06 21:48 2026/07/06 23:08 93f57954
Similar bugs (2)
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 466d 466d 0/29 auto-obsoleted due to no activity on 2025/07/25 02:49
upstream KCSAN: data-race in init_file / prepare_creds (2) fs prio:low 6 26 138d 408d 0/29 auto-obsoleted due to no activity on 2026/06/18 17:52

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

write to 0xffff8881016743a8 of 4 bytes by task 5347 on cpu 0:
 get_cred_many include/linux/cred.h:222 [inline]
 get_cred include/linux/cred.h:238 [inline]
 init_file+0x2d/0x1b0 fs/file_table.c:183
 alloc_empty_file+0x85/0x1e0 fs/file_table.c:266
 alloc_file fs/file_table.c:396 [inline]
 alloc_file_pseudo+0x92/0x120 fs/file_table.c:427
 sock_alloc_file+0x9c/0x1e0 net/socket.c:557
 sock_map_fd net/socket.c:587 [inline]
 __sys_socket+0x118/0x180 net/socket.c:1827
 __do_sys_socket net/socket.c:1832 [inline]
 __se_sys_socket net/socket.c:1830 [inline]
 __x64_sys_socket+0x3f/0x50 net/socket.c:1830
 x64_sys_call+0x246e/0x2550 arch/x86/include/generated/asm/syscalls_64.h:42
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888101674300 of 184 bytes by task 5346 on cpu 1:
 prepare_creds+0x71/0x550 kernel/cred.c:192
 __sys_setuid+0x65/0x300 kernel/sys.c:663
 __do_sys_setuid kernel/sys.c:700 [inline]
 __se_sys_setuid kernel/sys.c:698 [inline]
 __x64_sys_setuid+0x1e/0x30 kernel/sys.c:698
 x64_sys_call+0x1e96/0x2550 arch/x86/include/generated/asm/syscalls_64.h:106
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5346 Comm: syz.3.435 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/03 17:08 upstream 940de590b839 6a988719 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2026/08/29 19:40 upstream c20313e98b04 2f52988a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2026/07/06 21:48 upstream 8cdeaa50eae8 88b240e4 .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.