Hello,
syzbot found the following issue on:
HEAD commit: 666539eecdf4 Merge tag 'assoc-array-fixes-v2'
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=15b19e85580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b949a9d3c1d44ceb
dashboard link:
https://syzkaller.appspot.com/bug?extid=05f4ee3b6f5e60e8024f
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
CC: [
anna-...@linutronix.de fred...@kernel.org linux-...@vger.kernel.org mi...@kernel.org tg...@kernel.org]
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/a943b9915869/disk-666539ee.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/9bfd839d7ea5/vmlinux-666539ee.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/0f20b9720a71/bzImage-666539ee.xz
AI-generated root cause summary:
A data race occurs on struct task_struct::flags between process context and
hardirq context on the same CPU. In ns_capable_common()
(kernel/capability.c:343), the task non-atomically updates current->flags with
PF_SUPERPRIV while hard interrupts are enabled. When the local timer interrupt
fires during this window, the tick accounting path invokes
__acct_update_integrals() (kernel/tsacct.c:130 via acct_account_cputime()),
which performs an unmarked plain read of tsk->flags to check for PF_KTHREAD,
triggering a KCSAN data-race report.
full analysis:
https://syzkaller.appspot.com/x/ai_root_cause?x=05f4ee3b6f5e60e8024f
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+05f4ee...@syzkaller.appspotmail.com
==================================================================
BUG: KCSAN: data-race in acct_account_cputime / ns_capable
read to 0xffff888101d322ac of 4 bytes by interrupt on cpu 0:
__acct_update_integrals kernel/tsacct.c:130 [inline]
acct_account_cputime+0x61/0x1a0 kernel/tsacct.c:170
update_process_times+0x21/0x190 kernel/time/timer.c:2474
tick_sched_handle kernel/time/tick-sched.c:296 [inline]
tick_nohz_handler+0x241/0x3d0 kernel/time/tick-sched.c:317
__run_hrtimer kernel/time/hrtimer.c:2079 [inline]
__hrtimer_run_queues+0x1f8/0x540 kernel/time/hrtimer.c:2136
hrtimer_interrupt+0x27b/0x870 kernel/time/hrtimer.c:2255
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1051 [inline]
__sysvec_apic_timer_interrupt+0x5f/0x1f0 arch/x86/kernel/apic/apic.c:1068
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x6f/0x80 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
__preempt_count_add arch/x86/include/asm/preempt.h:98 [inline]
delay_tsc+0x4b/0xa0 arch/x86/lib/delay.c:77
udelay include/asm-generic/delay.h:64 [inline]
delay_access kernel/kcsan/core.c:332 [inline]
kcsan_setup_watchpoint+0x255/0x3f0 kernel/kcsan/core.c:622
ns_capable_common kernel/capability.c:343 [inline]
ns_capable+0x80/0xb0 kernel/capability.c:362
may_mount fs/namespace.c:2065 [inline]
can_umount fs/namespace.c:2082 [inline]
path_umount+0x95/0x900 fs/namespace.c:2101
ksys_umount fs/namespace.c:2126 [inline]
__do_sys_umount fs/namespace.c:2131 [inline]
__se_sys_umount fs/namespace.c:2129 [inline]
__x64_sys_umount+0xb6/0xe0 fs/namespace.c:2129
x64_sys_call+0x225e/0x2550 arch/x86/include/generated/asm/syscalls_64.h:167
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x11e/0x3a0 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
read-write to 0xffff888101d322ac of 4 bytes by task 3298 on cpu 0:
ns_capable_common kernel/capability.c:343 [inline]
ns_capable+0x80/0xb0 kernel/capability.c:362
may_mount fs/namespace.c:2065 [inline]
can_umount fs/namespace.c:2082 [inline]
path_umount+0x95/0x900 fs/namespace.c:2101
ksys_umount fs/namespace.c:2126 [inline]
__do_sys_umount fs/namespace.c:2131 [inline]
__se_sys_umount fs/namespace.c:2129 [inline]
__x64_sys_umount+0xb6/0xe0 fs/namespace.c:2129
x64_sys_call+0x225e/0x2550 arch/x86/include/generated/asm/syscalls_64.h:167
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x11e/0x3a0 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3298 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup