syzbot


KCSAN: data-race in copy_creds / prepare_creds

Status: moderation: reported on 2025/09/15 15:08
Subsystems: lsm
[Documentation on labels]
Reported-by: syzbot+82af432ca62af77047d1@syzkaller.appspotmail.com
First crash: 2h25m, last: 2h25m

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

write to 0xffff888104440d68 of 4 bytes by task 24608 on cpu 1:
 get_cred_many include/linux/cred.h:202 [inline]
 copy_creds+0x78/0x3f0 kernel/cred.c:305
 copy_process+0x658/0x2000 kernel/fork.c:2038
 kernel_clone+0x16c/0x5c0 kernel/fork.c:2605
 __do_sys_clone3 kernel/fork.c:2909 [inline]
 __se_sys_clone3+0x1c2/0x200 kernel/fork.c:2888
 __x64_sys_clone3+0x31/0x40 kernel/fork.c:2888
 x64_sys_call+0x1fc9/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:436
 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 0xffff888104440cc0 of 184 bytes by task 24615 on cpu 0:
 prepare_creds+0x6c/0x4c0 kernel/cred.c:219
 __do_sys_capset kernel/capability.c:247 [inline]
 __se_sys_capset+0x2a3/0x450 kernel/capability.c:216
 __x64_sys_capset+0x31/0x40 kernel/capability.c:216
 x64_sys_call+0x281f/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:127
 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: 24615 Comm: syz.2.7492 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/15 15:08 upstream f83ec76bf285 e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_creds / prepare_creds
* Struck through repros no longer work on HEAD.