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: 93d, 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 495d 495d 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 167d 437d 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 0xffff8881043cc8e8 of 4 bytes by task 7767 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 0xffff8881043cc840 of 184 bytes by task 7770 on cpu 1:
 prepare_creds+0x71/0x550 kernel/cred.c:192
 install_process_keyring security/keys/process_keys.c:296 [inline]
 lookup_user_key+0x204/0xd60 security/keys/process_keys.c:653
 __do_sys_request_key security/keys/keyctl.c:206 [inline]
 __se_sys_request_key+0x17e/0x2a0 security/keys/keyctl.c:167
 __x64_sys_request_key+0x55/0x70 security/keys/keyctl.c:167
 x64_sys_call+0x1741/0x2550 arch/x86/include/generated/asm/syscalls_64.h:250
 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: 7770 Comm: syz.5.7630 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/02 15:54 upstream ce1e0223d8ad 6d32eb1f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
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.