syzbot


KCSAN: data-race in copy_process / free_pid (13)

Status: moderation: reported on 2024/09/13 19:15
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+791d57f412d4c727a49b@syzkaller.appspotmail.com
First crash: 68d, last: 34d
Similar bugs (12)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in copy_process / free_pid (8) kernel 1 713d 713d 0/28 auto-obsoleted due to no activity on 2023/01/17 03:08
upstream KCSAN: data-race in copy_process / free_pid (11) kernel 1 179d 179d 0/28 auto-obsoleted due to no activity on 2024/06/30 01:30
upstream KCSAN: data-race in copy_process / free_pid kernel 1 1805d 1805d 0/28 auto-closed as invalid on 2020/02/20 19:37
upstream KCSAN: data-race in copy_process / free_pid (10) kernel 23 218d 347d 0/28 auto-obsoleted due to no activity on 2024/05/21 14:09
upstream KCSAN: data-race in copy_process / free_pid (9) kernel 12 462d 547d 0/28 auto-obsoleted due to no activity on 2023/09/21 05:02
upstream KCSAN: data-race in copy_process / free_pid (6) kernel 2 903d 907d 0/28 auto-closed as invalid on 2022/07/06 07:38
upstream KCSAN: data-race in copy_process / free_pid (4) kernel 1 1208d 1208d 0/28 auto-closed as invalid on 2021/09/04 11:26
upstream KCSAN: data-race in copy_process / free_pid (5) kernel 32 1044d 1163d 0/28 auto-closed as invalid on 2022/02/15 18:33
upstream KCSAN: data-race in copy_process / free_pid (2) kasan 1 1720d 1720d 0/28 auto-closed as invalid on 2020/05/15 22:36
upstream KCSAN: data-race in copy_process / free_pid (7) kernel 4 803d 855d 0/28 auto-obsoleted due to no activity on 2022/10/14 18:22
upstream KCSAN: data-race in copy_process / free_pid (3) kernel 1 1399d 1399d 0/28 auto-closed as invalid on 2021/02/26 04:07
upstream KCSAN: data-race in copy_process / free_pid (12) kernel 1 136d 136d 0/28 auto-obsoleted due to no activity on 2024/08/11 08:23

Sample crash report:
==================================================================
BUG: KCSAN: data-race in copy_process / free_pid

read-write to 0xffffffff8665d858 of 4 bytes by task 15235 on cpu 0:
 free_pid+0x80/0x170 kernel/pid.c:143
 copy_process+0x1213/0x1f90 kernel/fork.c:2622
 kernel_clone+0x167/0x5e0 kernel/fork.c:2784
 __do_sys_clone3 kernel/fork.c:3088 [inline]
 __se_sys_clone3+0x1b5/0x1f0 kernel/fork.c:3067
 __x64_sys_clone3+0x31/0x40 kernel/fork.c:3067
 x64_sys_call+0x287d/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:436
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff8665d858 of 4 bytes by task 15389 on cpu 1:
 copy_process+0x1799/0x1f90 kernel/fork.c:2527
 kernel_clone+0x167/0x5e0 kernel/fork.c:2784
 __do_sys_clone kernel/fork.c:2927 [inline]
 __se_sys_clone kernel/fork.c:2911 [inline]
 __x64_sys_clone+0xe8/0x120 kernel/fork.c:2911
 x64_sys_call+0x2d23/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:57
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x80000220 -> 0x8000021f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 15389 Comm: dhcpcd-run-hook Not tainted 6.12.0-rc3-syzkaller-00183-g6efbea77b390 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/18 02:41 upstream 6efbea77b390 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_process / free_pid
2024/10/16 03:07 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_process / free_pid
2024/10/12 07:28 upstream 9e4c6c1ad9a1 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_process / free_pid
2024/09/18 05:28 upstream 2f27fce67173 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_process / free_pid
2024/09/16 19:25 upstream adfc3ded5c33 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_process / free_pid
2024/09/13 19:15 upstream 196145c606d0 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_process / free_pid
* Struck through repros no longer work on HEAD.