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=12cd6803580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b949a9d3c1d44ceb
dashboard link:
https://syzkaller.appspot.com/bug?extid=2219bacf405655645232
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 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:
KCSAN detected a 4-byte data race on `task_struct::flags` between
`do_execveat_common()` in `fs/exec.c` and `posixtimer_get_target()` in
`kernel/signal.c` on the same CPU. In task context with interrupts enabled,
`do_execveat_common()` performs an unmarked read-modify-write (`current->flags
&= ~PF_NPROC_EXCEEDED`). When an hrtimer interrupt fires on the same CPU during
this operation, `posixtimer_get_target()` (invoked via `posix_timer_fn()` ->
`posix_timer_queue_signal()` -> `posixtimer_send_sigqueue()`) performs an
unmarked read of `current->flags` (`!(current->flags & PF_EXITING)`) before
acquiring `sighand->siglock`. Because neither access uses
`READ_ONCE()`/`WRITE_ONCE()` (or `WRITE_ONCE` with IRQ synchronization), KCSAN
flags the concurrent access on `current->flags`.
full analysis:
https://syzkaller.appspot.com/x/ai_root_cause?x=2219bacf405655645232
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+2219ba...@syzkaller.appspotmail.com
==================================================================
BUG: KCSAN: data-race in do_execveat_common / posixtimer_send_sigqueue
read to 0xffff8881019bc52c of 4 bytes by interrupt on cpu 0:
posixtimer_get_target kernel/signal.c:2027 [inline]
posixtimer_send_sigqueue+0xd8/0x8d0 kernel/signal.c:2056
posix_timer_queue_signal kernel/time/posix-timers.c:365 [inline]
posix_timer_fn+0x93/0xc0 kernel/time/posix-timers.c:380
__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
native_pause arch/x86/include/asm/vdso/processor.h:13 [inline]
delay_tsc+0x43/0xa0 arch/x86/lib/delay.c:76
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
do_execveat_common+0xf3/0x720 fs/exec.c:1914
__do_sys_execveat fs/exec.c:2047 [inline]
__se_sys_execveat fs/exec.c:2040 [inline]
__x64_sys_execveat+0x76/0xa0 fs/exec.c:2040
x64_sys_call+0x21ae/0x2550 arch/x86/include/generated/asm/syscalls_64.h:323
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
write to 0xffff8881019bc52c of 4 bytes by task 4267 on cpu 0:
do_execveat_common+0xf3/0x720 fs/exec.c:1914
__do_sys_execveat fs/exec.c:2047 [inline]
__se_sys_execveat fs/exec.c:2040 [inline]
__x64_sys_execveat+0x76/0xa0 fs/exec.c:2040
x64_sys_call+0x21ae/0x2550 arch/x86/include/generated/asm/syscalls_64.h:323
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: 4267 Comm: syz.0.285 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
==================================================================
process 'syz.0.285' launched './file0' with NULL argv: empty string added
---
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