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: 31d, last: 3d06h
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 676d 676d 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 142d 142d 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 1768d 1768d 0/28 auto-closed as invalid on 2020/02/20 19:37
upstream KCSAN: data-race in copy_process / free_pid (10) kernel 23 181d 310d 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 425d 511d 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 867d 870d 0/28 auto-closed as invalid on 2022/07/06 07:38
upstream KCSAN: data-race in copy_process / free_pid (4) kernel 1 1172d 1172d 0/28 auto-closed as invalid on 2021/09/04 11:26
upstream KCSAN: data-race in copy_process / free_pid (5) kernel 32 1007d 1126d 0/28 auto-closed as invalid on 2022/02/15 18:33
upstream KCSAN: data-race in copy_process / free_pid (2) kasan 1 1683d 1683d 0/28 auto-closed as invalid on 2020/05/15 22:36
upstream KCSAN: data-race in copy_process / free_pid (7) kernel 4 766d 819d 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 1362d 1362d 0/28 auto-closed as invalid on 2021/02/26 04:07
upstream KCSAN: data-race in copy_process / free_pid (12) kernel 1 100d 100d 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 24262 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 244 on cpu 1:
 copy_process+0x1799/0x1f90 kernel/fork.c:2527
 kernel_clone+0x167/0x5e0 kernel/fork.c:2784
 user_mode_thread+0x7d/0xb0 kernel/fork.c:2862
 call_usermodehelper_exec_sync kernel/umh.c:133 [inline]
 call_usermodehelper_exec_work+0x7a/0x150 kernel/umh.c:164
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x80000192 -> 0x80000191

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 244 Comm: kworker/u8:5 Not tainted 6.12.0-rc2-syzkaller-00260-g9e4c6c1ad9a1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events_unbound call_usermodehelper_exec_work
==================================================================
netdevsim netdevsim4 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim4 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim4 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim4 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
bridge_slave_1: left allmulticast mode
bridge_slave_1: left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
bridge_slave_0: left allmulticast mode
bridge_slave_0: left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond0 (unregistering): Released all slaves
hsr_slave_0: left promiscuous mode
hsr_slave_1: left promiscuous mode
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
veth1_macvtap: left promiscuous mode
veth0_macvtap: left promiscuous mode
veth1_vlan: left promiscuous mode
veth0_vlan: left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
netdevsim netdevsim3 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
bridge_slave_1: left allmulticast mode
bridge_slave_1: left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
bridge_slave_0: left allmulticast mode
bridge_slave_0: left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
bridge_slave_1: left allmulticast mode
bridge_slave_1: left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
bridge_slave_0: left allmulticast mode
bridge_slave_0: left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond0 (unregistering): Released all slaves
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond0 (unregistering): Released all slaves
hsr_slave_0: left promiscuous mode
hsr_slave_1: left promiscuous mode
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
hsr_slave_0: left promiscuous mode
hsr_slave_1: left promiscuous mode
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
veth1_macvtap: left promiscuous mode
veth0_macvtap: left promiscuous mode
veth1_vlan: left promiscuous mode
veth0_vlan: left promiscuous mode
veth1_macvtap: left promiscuous mode
veth0_macvtap: left promiscuous mode
veth1_vlan: left promiscuous mode
veth0_vlan: left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
bridge_slave_1: left allmulticast mode
bridge_slave_1: left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
bridge_slave_0: left allmulticast mode
bridge_slave_0: left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond0 (unregistering): Released all slaves
hsr_slave_0: left promiscuous mode
hsr_slave_1: left promiscuous mode
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
veth1_macvtap: left promiscuous mode
veth0_macvtap: left promiscuous mode
veth1_vlan: left promiscuous mode
veth0_vlan: left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.