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=1719ce4d580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b949a9d3c1d44ceb
dashboard link:
https://syzkaller.appspot.com/bug?extid=4f86b1de059732e15a1c
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
CC: [
ac...@kernel.org adrian...@intel.com alexander...@linux.intel.com b...@alien8.de dave....@linux.intel.com h...@zytor.com iro...@google.com james...@linaro.org jo...@kernel.org linux-...@vger.kernel.org linux-pe...@vger.kernel.org mark.r...@arm.com mi...@redhat.com namh...@kernel.org pet...@infradead.org tg...@kernel.org x...@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 reported a data race on `current->pagefault_disabled` between task context
and an interrupt handler executing on the same CPU. In task context,
`strncpy_from_kernel_nofault()` (`mm/maccess.c`) invoked `pagefault_disable()`
and `pagefault_enable()`, which perform plain, unmarked read-modify-write
operations (`current->pagefault_disabled++` and `current->pagefault_disabled--`
in `include/linux/uaccess.h`) with interrupts enabled. An APIC timer interrupt
occurred during task execution and triggered a perf sample callchain walk
(`perf_callchain_user()` in `arch/x86/events/core.c`), which also invoked
`pagefault_disable()` / `pagefault_enable()` to read user stack frames,
accessing the interrupted task's `pagefault_disabled` counter without
synchronization. Under the Linux Kernel Memory Model, concurrent unmarked
accesses between task and interrupt contexts constitute a data race.
full analysis:
https://syzkaller.appspot.com/x/ai_root_cause?x=4f86b1de059732e15a1c
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+4f86b1...@syzkaller.appspotmail.com
==================================================================
BUG: KCSAN: data-race in perf_callchain_user / strncpy_from_kernel_nofault
read-write to 0xffff88810283bfd4 of 4 bytes by interrupt on cpu 1:
pagefault_disabled_inc include/linux/uaccess.h:248 [inline]
pagefault_disable include/linux/uaccess.h:265 [inline]
perf_callchain_user+0x171/0x910 arch/x86/events/core.c:3468
get_perf_callchain+0x5c4/0x700 kernel/events/callchain.c:270
perf_callchain+0x224/0x270 kernel/events/core.c:8761
perf_sample_save_callchain include/linux/perf_event.h:1385 [inline]
perf_prepare_sample+0x1f5/0x1550 kernel/events/core.c:8829
bpf_overflow_handler kernel/events/core.c:10821 [inline]
__perf_event_overflow+0x308/0x950 kernel/events/core.c:10921
perf_event_overflow kernel/events/core.c:11004 [inline]
perf_swevent_hrtimer+0x293/0x320 kernel/events/core.c:12424
__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
pagefault_disabled_inc include/linux/uaccess.h:248 [inline]
pagefault_disable include/linux/uaccess.h:265 [inline]
strncpy_from_kernel_nofault+0x67/0x120 mm/maccess.c:95
bpf_probe_read_kernel_str_common kernel/trace/bpf_trace.c:294 [inline]
____bpf_probe_read_kernel_str kernel/trace/bpf_trace.c:303 [inline]
bpf_probe_read_kernel_str+0x2a/0x70 kernel/trace/bpf_trace.c:300
bpf_prog_a75bc605385d949b+0x43/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1547 [inline]
__bpf_prog_run include/linux/filter.h:813 [inline]
bpf_prog_run include/linux/filter.h:820 [inline]
bpf_prog_run_pin_on_cpu include/linux/filter.h:837 [inline]
bpf_flow_dissect+0x157/0x360 net/core/flow_dissector.c:1024
bpf_prog_test_run_flow_dissector+0x25d/0x360 net/bpf/test_run.c:1565
bpf_prog_test_run+0x21b/0x360 kernel/bpf/syscall.c:4860
__sys_bpf+0x914/0xc50 kernel/bpf/syscall.c:6478
__do_sys_bpf kernel/bpf/syscall.c:6582 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6579 [inline]
__x64_sys_bpf+0x69/0x80 kernel/bpf/syscall.c:6579
x64_sys_call+0xf26/0x2550 arch/x86/include/generated/asm/syscalls_64.h:322
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 0xffff88810283bfd4 of 4 bytes by task 9219 on cpu 1:
pagefault_disabled_inc include/linux/uaccess.h:248 [inline]
pagefault_disable include/linux/uaccess.h:265 [inline]
strncpy_from_kernel_nofault+0x67/0x120 mm/maccess.c:95
bpf_probe_read_kernel_str_common kernel/trace/bpf_trace.c:294 [inline]
____bpf_probe_read_kernel_str kernel/trace/bpf_trace.c:303 [inline]
bpf_probe_read_kernel_str+0x2a/0x70 kernel/trace/bpf_trace.c:300
bpf_prog_a75bc605385d949b+0x43/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1547 [inline]
__bpf_prog_run include/linux/filter.h:813 [inline]
bpf_prog_run include/linux/filter.h:820 [inline]
bpf_prog_run_pin_on_cpu include/linux/filter.h:837 [inline]
bpf_flow_dissect+0x157/0x360 net/core/flow_dissector.c:1024
bpf_prog_test_run_flow_dissector+0x25d/0x360 net/bpf/test_run.c:1565
bpf_prog_test_run+0x21b/0x360 kernel/bpf/syscall.c:4860
__sys_bpf+0x914/0xc50 kernel/bpf/syscall.c:6478
__do_sys_bpf kernel/bpf/syscall.c:6582 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6579 [inline]
__x64_sys_bpf+0x69/0x80 kernel/bpf/syscall.c:6579
x64_sys_call+0xf26/0x2550 arch/x86/include/generated/asm/syscalls_64.h:322
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: 1 UID: 0 PID: 9219 Comm: syz.8.1958 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
==================================================================
==================================================================
BUG: KCSAN: data-race in perf_callchain_user / strncpy_from_kernel_nofault
read-write to 0xffff88810283bfd4 of 4 bytes by interrupt on cpu 1:
pagefault_disabled_inc include/linux/uaccess.h:248 [inline]
pagefault_disable include/linux/uaccess.h:265 [inline]
perf_callchain_user+0x171/0x910 arch/x86/events/core.c:3468
get_perf_callchain+0x5c4/0x700 kernel/events/callchain.c:270
perf_callchain+0x224/0x270 kernel/events/core.c:8761
perf_sample_save_callchain include/linux/perf_event.h:1385 [inline]
perf_prepare_sample+0x1f5/0x1550 kernel/events/core.c:8829
bpf_overflow_handler kernel/events/core.c:10821 [inline]
__perf_event_overflow+0x308/0x950 kernel/events/core.c:10921
perf_event_overflow kernel/events/core.c:11004 [inline]
perf_swevent_hrtimer+0x293/0x320 kernel/events/core.c:12424
__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
rdtsc_ordered arch/x86/include/asm/tsc.h:57 [inline]
delay_tsc+0x5b/0xa0 arch/x86/lib/delay.c:70
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
pagefault_disabled_dec include/linux/uaccess.h:253 [inline]
pagefault_enable include/linux/uaccess.h:280 [inline]
strncpy_from_kernel_nofault+0xde/0x120 mm/maccess.c:-1
bpf_probe_read_kernel_str_common kernel/trace/bpf_trace.c:294 [inline]
____bpf_probe_read_kernel_str kernel/trace/bpf_trace.c:303 [inline]
bpf_probe_read_kernel_str+0x2a/0x70 kernel/trace/bpf_trace.c:300
bpf_prog_a75bc605385d949b+0x43/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1547 [inline]
__bpf_prog_run include/linux/filter.h:813 [inline]
bpf_prog_run include/linux/filter.h:820 [inline]
bpf_prog_run_pin_on_cpu include/linux/filter.h:837 [inline]
bpf_flow_dissect+0x157/0x360 net/core/flow_dissector.c:1024
bpf_prog_test_run_flow_dissector+0x25d/0x360 net/bpf/test_run.c:1565
bpf_prog_test_run+0x21b/0x360 kernel/bpf/syscall.c:4860
__sys_bpf+0x914/0xc50 kernel/bpf/syscall.c:6478
__do_sys_bpf kernel/bpf/syscall.c:6582 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6579 [inline]
__x64_sys_bpf+0x69/0x80 kernel/bpf/syscall.c:6579
x64_sys_call+0xf26/0x2550 arch/x86/include/generated/asm/syscalls_64.h:322
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 0xffff88810283bfd4 of 4 bytes by task 9219 on cpu 1:
pagefault_disabled_dec include/linux/uaccess.h:253 [inline]
pagefault_enable include/linux/uaccess.h:280 [inline]
strncpy_from_kernel_nofault+0xde/0x120 mm/maccess.c:-1
bpf_probe_read_kernel_str_common kernel/trace/bpf_trace.c:294 [inline]
____bpf_probe_read_kernel_str kernel/trace/bpf_trace.c:303 [inline]
bpf_probe_read_kernel_str+0x2a/0x70 kernel/trace/bpf_trace.c:300
bpf_prog_a75bc605385d949b+0x43/0x49
bpf_dispatcher_nop_func include/linux/bpf.h:1547 [inline]
__bpf_prog_run include/linux/filter.h:813 [inline]
bpf_prog_run include/linux/filter.h:820 [inline]
bpf_prog_run_pin_on_cpu include/linux/filter.h:837 [inline]
bpf_flow_dissect+0x157/0x360 net/core/flow_dissector.c:1024
bpf_prog_test_run_flow_dissector+0x25d/0x360 net/bpf/test_run.c:1565
bpf_prog_test_run+0x21b/0x360 kernel/bpf/syscall.c:4860
__sys_bpf+0x914/0xc50 kernel/bpf/syscall.c:6478
__do_sys_bpf kernel/bpf/syscall.c:6582 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6579 [inline]
__x64_sys_bpf+0x69/0x80 kernel/bpf/syscall.c:6579
x64_sys_call+0xf26/0x2550 arch/x86/include/generated/asm/syscalls_64.h:322
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: 1 UID: 0 PID: 9219 Comm: syz.8.1958 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