syzbot


KCSAN: data-race in __percpu_counter_init_many / copy_mm

Status: moderation: reported on 2025/05/19 18:56
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+5963acb161b25848dd87@syzkaller.appspotmail.com
First crash: 5d20h, last: 5d20h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __percpu_counter_init_many / copy_mm

write to 0xffff888109faec58 of 8 bytes by task 3573 on cpu 0:
 __list_add include/linux/list.h:153 [inline]
 list_add include/linux/list.h:169 [inline]
 __percpu_counter_init_many+0x292/0x310 lib/percpu_counter.c:220
 mm_init+0x67b/0x810 kernel/fork.c:1335
 mm_alloc+0x81/0xa0 kernel/fork.c:1368
 bprm_mm_init fs/exec.c:375 [inline]
 alloc_bprm+0x20a/0x660 fs/exec.c:1574
 kernel_execve+0x85/0x660 fs/exec.c:1993
 call_usermodehelper_exec_async+0x197/0x250 kernel/umh.c:109
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff888109fae880 of 1344 bytes by task 3571 on cpu 1:
 dup_mm kernel/fork.c:1729 [inline]
 copy_mm+0xfb/0x1360 kernel/fork.c:1787
 copy_process+0xcf1/0x1f90 kernel/fork.c:2430
 kernel_clone+0x16c/0x5b0 kernel/fork.c:2845
 __do_sys_clone kernel/fork.c:2988 [inline]
 __se_sys_clone kernel/fork.c:2972 [inline]
 __x64_sys_clone+0xe6/0x120 kernel/fork.c:2972
 x64_sys_call+0x2c59/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:57
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3571 Comm: dhcpcd-run-hook Not tainted 6.15.0-rc7-syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/19 18:55 upstream a5806cd506af b84f0537 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __percpu_counter_init_many / copy_mm
* Struck through repros no longer work on HEAD.