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: 54d, last: 2h11m
✨ 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 456d 456d 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 128d 398d 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 0xffff888100a81828 of 4 bytes by task 9511 on cpu 1:
 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
 __anon_inode_getfile fs/anon_inodes.c:164 [inline]
 __anon_inode_getfd fs/anon_inodes.c:281 [inline]
 anon_inode_getfd+0xbf/0x190 fs/anon_inodes.c:305
 bpf_map_new_fd+0x52/0x70 kernel/bpf/syscall.c:1199
 map_create+0x43c/0xfe0 kernel/bpf/syscall.c:1673
 __sys_bpf+0x99a/0xc30 kernel/bpf/syscall.c:6344
 __do_sys_bpf kernel/bpf/syscall.c:6486 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:6483 [inline]
 __x64_sys_bpf+0x69/0x80 kernel/bpf/syscall.c:6483
 x64_sys_call+0xf26/0x2550 arch/x86/include/generated/asm/syscalls_64.h:322
 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 0xffff888100a81780 of 184 bytes by task 9509 on cpu 0:
 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: 0 UID: 0 PID: 9509 Comm: syz.6.1865 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.