syzbot


KCSAN: data-race in __perf_event_overflow / __perf_event_set_bpf_prog

Status: upstream: reported on 2026/01/26 23:50
Subsystems: perf
Labels: race:harmful
[Documentation on labels]
Reported-by: syzbot+2a077cb788749964cf68@syzkaller.appspotmail.com
First crash: 20d, last: 1d22h
Duplicate bugs (1)
Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
KCSAN: data-race in __perf_event_overflow / perf_event_attach_bpf_prog (2) bpf trace 6 2 28d 35d 0/29 closed as dup on 2026/02/06 06:54
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] Monthly perf report (Feb 2026) 0 (1) 2026/02/14 09:07
[PATCH] perf: Fix data race in perf_event_set_bpf_handler() 10 (10) 2026/01/30 20:32
[syzbot] [perf?] KCSAN: data-race in __perf_event_overflow / __perf_event_set_bpf_prog 0 (1) 2026/01/26 23:50

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __perf_event_overflow / __perf_event_set_bpf_prog

write to 0xffff888132b45168 of 8 bytes by task 25394 on cpu 1:
 perf_event_set_bpf_handler kernel/events/core.c:10644 [inline]
 __perf_event_set_bpf_prog+0x419/0x470 kernel/events/core.c:11595
 _perf_ioctl kernel/events/core.c:6665 [inline]
 perf_ioctl+0x92e/0x15d0 kernel/events/core.c:6725
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:583
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:583
 x64_sys_call+0x1563/0x3020 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888132b45168 of 8 bytes by interrupt on cpu 0:
 __perf_event_overflow+0x252/0x920 kernel/events/core.c:10702
 perf_swevent_hrtimer+0x28d/0x310 kernel/events/core.c:12157
 __run_hrtimer kernel/time/hrtimer.c:1785 [inline]
 __hrtimer_run_queues+0x207/0x4c0 kernel/time/hrtimer.c:1849
 hrtimer_interrupt+0x269/0x810 kernel/time/hrtimer.c:1911
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1045 [inline]
 __sysvec_apic_timer_interrupt+0x5f/0x1d0 arch/x86/kernel/apic/apic.c:1062
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
 sysvec_apic_timer_interrupt+0x6f/0x80 arch/x86/kernel/apic/apic.c:1056
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
 write_comp_data kernel/kcov.c:270 [inline]
 __sanitizer_cov_trace_const_cmp4+0x82/0x90 kernel/kcov.c:314
 io_nop+0xf0/0x2f0 io_uring/nop.c:74
 __io_issue_sqe+0xfd/0x2d0 io_uring/io_uring.c:1384
 io_issue_sqe+0x208/0xbf0 io_uring/io_uring.c:1407
 io_queue_sqe io_uring/io_uring.c:1634 [inline]
 io_submit_sqe io_uring/io_uring.c:1920 [inline]
 io_submit_sqes+0x7db/0x1240 io_uring/io_uring.c:2043
 __do_sys_io_uring_enter io_uring/io_uring.c:2603 [inline]
 __se_sys_io_uring_enter+0x1c9/0xf50 io_uring/io_uring.c:2538
 __x64_sys_io_uring_enter+0x78/0x90 io_uring/io_uring.c:2538
 x64_sys_call+0x1e16/0x3020 arch/x86/include/generated/asm/syscalls_64.h:427
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0xffffc9000693f000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 25381 Comm: syz.1.6121 Tainted: G        W           syzkaller #0 PREEMPT(full) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/13 21:02 upstream cee73b1e840c 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __perf_event_overflow / __perf_event_set_bpf_prog
2026/02/11 09:56 upstream dc855b77719f 441e25b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __perf_event_overflow / __perf_event_set_bpf_prog
2026/01/26 07:01 upstream 023777797472 55756628 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __perf_event_overflow / __perf_event_set_bpf_prog
* Struck through repros no longer work on HEAD.