syzbot


KCSAN: data-race in drop_sysctl_table / proc_sys_revalidate

Status: moderation: reported on 2024/11/20 13:22
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+0f36826deffa40789116@syzkaller.appspotmail.com
First crash: 17h26m, last: 17h26m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in drop_sysctl_table / proc_sys_revalidate

write to 0xffff88810aabe858 of 8 bytes by task 9 on cpu 0:
 start_unregistering fs/proc/proc_sysctl.c:303 [inline]
 drop_sysctl_table+0x97/0x260 fs/proc/proc_sysctl.c:1506
 drop_sysctl_table+0x1cd/0x260 fs/proc/proc_sysctl.c:1513
 unregister_sysctl_table+0x30/0x50 fs/proc/proc_sysctl.c:1531
 unregister_net_sysctl_table+0x15/0x20 net/sysctl_net.c:177
 __devinet_sysctl_unregister net/ipv4/devinet.c:2633 [inline]
 devinet_sysctl_unregister net/ipv4/devinet.c:2661 [inline]
 inetdev_destroy net/ipv4/devinet.c:345 [inline]
 inetdev_event+0x614/0xad0 net/ipv4/devinet.c:1643
 notifier_call_chain kernel/notifier.c:93 [inline]
 raw_notifier_call_chain+0x6f/0x1d0 kernel/notifier.c:461
 call_netdevice_notifiers_info+0xae/0x100 net/core/dev.c:1996
 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline]
 call_netdevice_notifiers net/core/dev.c:2048 [inline]
 unregister_netdevice_many_notify+0x8b7/0x11b0 net/core/dev.c:11407
 unregister_netdevice_many net/core/dev.c:11469 [inline]
 unregister_netdevice_queue+0x1f4/0x220 net/core/dev.c:11343
 unregister_netdevice include/linux/netdevice.h:3118 [inline]
 ser_release+0x118/0x180 drivers/net/caif/caif_serial.c:310
 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

read to 0xffff88810aabe858 of 8 bytes by task 3054 on cpu 1:
 proc_sys_revalidate+0x49/0x70 fs/proc/proc_sysctl.c:885
 lookup_fast+0x177/0x2a0
 walk_component fs/namei.c:2108 [inline]
 link_path_walk+0x464/0x820 fs/namei.c:2477
 path_openat+0x1af/0x1fa0 fs/namei.c:3983
 do_filp_open+0x107/0x230 fs/namei.c:4014
 do_sys_openat2+0xab/0x120 fs/open.c:1398
 do_sys_open fs/open.c:1413 [inline]
 __do_sys_openat fs/open.c:1429 [inline]
 __se_sys_openat fs/open.c:1424 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1424
 x64_sys_call+0x2b30/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:258
 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: 0x0000000000000000 -> 0xffffffffffffffea

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3054 Comm: dhcpcd Not tainted 6.12.0-syzkaller-01782-gbf9aa14fc523 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 13:21 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drop_sysctl_table / proc_sys_revalidate
* Struck through repros no longer work on HEAD.