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: 81d, last: 9d07h
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 139d 139d 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 0xffff888161e608e8 of 4 bytes by task 9477 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
 path_openat+0x68/0x2170 fs/namei.c:4120
 do_filp_open+0x109/0x230 fs/namei.c:4161
 do_open_execat+0xd8/0x260 fs/exec.c:783
 alloc_bprm+0x25/0x350 fs/exec.c:1410
 do_execveat_common+0x12e/0x750 fs/exec.c:1811
 do_execveat fs/exec.c:1945 [inline]
 __do_sys_execveat fs/exec.c:2019 [inline]
 __se_sys_execveat fs/exec.c:2013 [inline]
 __x64_sys_execveat+0x73/0x90 fs/exec.c:2013
 x64_sys_call+0x1fec/0x3000 arch/x86/include/generated/asm/syscalls_64.h:323
 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 0xffff888161e60840 of 184 bytes by task 9483 on cpu 0:
 prepare_creds+0x6c/0x4c0 kernel/cred.c:219
 prepare_exec_creds+0x14/0xe0 kernel/cred.c:261
 prepare_bprm_creds fs/exec.c:1364 [inline]
 bprm_execve+0x70/0x970 fs/exec.c:1734
 do_execveat_common+0x6e6/0x750 fs/exec.c:1860
 do_execveat fs/exec.c:1945 [inline]
 __do_sys_execveat fs/exec.c:2019 [inline]
 __se_sys_execveat fs/exec.c:2013 [inline]
 __x64_sys_execveat+0x73/0x90 fs/exec.c:2013
 x64_sys_call+0x1fec/0x3000 arch/x86/include/generated/asm/syscalls_64.h:323
 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: 9483 Comm: syz.1.2133 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/06 20:58 upstream fd94619c4336 91305dbe .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2025/10/04 06:22 upstream 9b0d551bcc05 49379ee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2025/09/21 15:36 upstream f975f08c2e89 67c37560 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
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.