From: syzbot <syzbot+a480b581a0bf5f5e8b0d@syzkaller.appspotmail.com>
To: acme@kernel.org, adrian.hunter@intel.com,
alexander.shishkin@linux.intel.com, irogers@google.com,
james.clark@linaro.org, jolsa@kernel.org,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
mark.rutland@arm.com, mingo@redhat.com, namhyung@kernel.org,
peterz@infradead.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [perf?] KCSAN: data-race in __perf_event_overflow / perf_pending_task
Date: Thu, 19 Nov 2026 02:54:36 -0800 [thread overview]
Message-ID: <6afed56c.c909bf2b.1e1a73.0000.GAE@google.com> (raw)
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=12c9e5c3580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b949a9d3c1d44ceb
dashboard link: https://syzkaller.appspot.com/bug?extid=a480b581a0bf5f5e8b0d
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
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:
In kernel/events/core.c, perf_pending_task() clears event->pending_work to 0
before calling perf_sigtrap(), which reads event->pending_addr. Because
perf_pending_task() runs in task context with interrupts enabled, a concurrent
interrupt (such as an hrtimer interrupt calling __perf_event_overflow()) on the
same CPU observes event->pending_work == 0, considers the pending slot
available, re-enqueues event->pending_task via task_work_add(), and overwrites
event->pending_addr while perf_sigtrap() is concurrently reading it.
full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=a480b581a0bf5f5e8b0d
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a480b581a0bf5f5e8b0d@syzkaller.appspotmail.com
==================================================================
BUG: KCSAN: data-race in __perf_event_overflow / perf_pending_task
write to 0xffff88811b623050 of 8 bytes by interrupt on cpu 1:
__perf_event_overflow+0x7f1/0x950 kernel/events/core.c:10959
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
perf_sigtrap kernel/events/core.c:7676 [inline]
perf_pending_task+0x16a/0x220 kernel/events/core.c:7780
task_work_run+0x145/0x1a0 kernel/task_work.c:233
resume_user_mode_work+0x85/0xa0 include/linux/resume_user_mode.h:50
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop kernel/entry/common.c:101 [inline]
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:244 [inline]
irqentry_exit_to_user_mode include/linux/irq-entry-common.h:315 [inline]
irqentry_exit+0x170/0x640 kernel/entry/common.c:152
sysvec_apic_timer_interrupt+0x44/0x80 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
read to 0xffff88811b623050 of 8 bytes by task 4399 on cpu 1:
perf_sigtrap kernel/events/core.c:7676 [inline]
perf_pending_task+0x16a/0x220 kernel/events/core.c:7780
task_work_run+0x145/0x1a0 kernel/task_work.c:233
resume_user_mode_work+0x85/0xa0 include/linux/resume_user_mode.h:50
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop kernel/entry/common.c:101 [inline]
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:244 [inline]
irqentry_exit_to_user_mode include/linux/irq-entry-common.h:315 [inline]
irqentry_exit+0x170/0x640 kernel/entry/common.c:152
sysvec_apic_timer_interrupt+0x44/0x80 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4399 Comm: syz.0.427 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 syzkaller@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
reply other threads:[~2026-11-19 10:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6afed56c.c909bf2b.1e1a73.0000.GAE@google.com \
--to=syzbot+a480b581a0bf5f5e8b0d@syzkaller.appspotmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox