From: syzbot <syzbot+1faa12be48036b80e416@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
mathieu.desnoyers@efficios.com, mhiramat@kernel.org,
rostedt@goodmis.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [trace?] KCSAN: data-race in __trace_trigger_soft_disabled / apply_subsystem_event_filter
Date: Sat, 21 Nov 2026 16:18:36 -0800 [thread overview]
Message-ID: <6b0234dc.44b41460.34b83f.0019.GAE@google.com> (raw)
Hello,
syzbot found the following issue on:
HEAD commit: d0f871bfb831 Merge tag 'arm64-fixes' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12708a03580000
kernel config: https://syzkaller.appspot.com/x/.config?x=886d2ddd2d6b664e
dashboard link: https://syzkaller.appspot.com/bug?extid=1faa12be48036b80e416
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/018edb90159d/disk-d0f871bf.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b27112368dea/vmlinux-d0f871bf.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1f2c7b502c76/bzImage-d0f871bf.xz
AI-generated root cause summary:
`filter_disable()` (and its counterpart `event_set_filtered_flag()`) in
`kernel/trace/trace_events_filter.c` updates `struct trace_event_file::flags`
using non-atomic read-modify-write operations (`file->flags &=
~EVENT_FILE_FL_FILTERED`) instead of atomic bit operations
(`test_and_clear_bit()`/`test_and_set_bit()`). Meanwhile, tracepoint handlers
such as `trace_trigger_soft_disabled()` and `__trace_trigger_soft_disabled()`
read `file->flags` locklessly without `READ_ONCE()`. Writing a failing subsystem
filter via `subsystem_filter_write()` triggers `filter_disable()` while
`sched_switch` concurrently executes `__trace_trigger_soft_disabled()` on
another CPU, causing a KCSAN data race on `file->flags`.
full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=1faa12be48036b80e416
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1faa12be48036b80e416@syzkaller.appspotmail.com
==================================================================
BUG: KCSAN: data-race in __trace_trigger_soft_disabled / apply_subsystem_event_filter
write to 0xffff888100172888 of 8 bytes by task 5433 on cpu 0:
filter_disable kernel/trace/trace_events_filter.c:1325 [inline]
process_system_preds kernel/trace/trace_events_filter.c:2331 [inline]
create_system_filter kernel/trace/trace_events_filter.c:2486 [inline]
apply_subsystem_event_filter+0x28f/0xcd0 kernel/trace/trace_events_filter.c:2574
subsystem_filter_write+0x79/0xd0 kernel/trace/trace_events.c:2523
vfs_write+0x24f/0x9b0 fs/read_write.c:665
ksys_write+0xdc/0x1a0 fs/read_write.c:719
__do_sys_write fs/read_write.c:730 [inline]
__se_sys_write fs/read_write.c:727 [inline]
__x64_sys_write+0x40/0x50 fs/read_write.c:727
x64_sys_call+0x154e/0x2550 arch/x86/include/generated/asm/syscalls_64.h:2
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 to 0xffff888100172888 of 8 bytes by task 5440 on cpu 1:
__trace_trigger_soft_disabled+0x20/0x1a0 kernel/trace/trace_events_trigger.c:217
trace_trigger_soft_disabled include/linux/trace_events.h:777 [inline]
do_trace_event_raw_event_sched_switch include/trace/events/sched.h:220 [inline]
trace_event_raw_event_sched_switch+0x186/0x1a0 include/trace/events/sched.h:220
__traceiter_sched_switch+0x3f/0x60 include/trace/events/sched.h:220
__do_trace_sched_switch include/trace/events/sched.h:220 [inline]
trace_sched_switch include/trace/events/sched.h:220 [inline]
__schedule+0xc3d/0xd30 kernel/sched/core.c:7383
preempt_schedule_common+0x12/0x40 kernel/sched/core.c:7565
preempt_schedule_thunk+0x16/0x40 arch/x86/entry/thunk.S:12
__raw_spin_unlock include/linux/spinlock_api_smp.h:201 [inline]
_raw_spin_unlock+0x1e/0x30 kernel/locking/spinlock.c:213
spin_unlock include/linux/spinlock.h:401 [inline]
zap_pte_range mm/memory.c:2076 [inline]
zap_pmd_range mm/memory.c:2134 [inline]
zap_pud_range mm/memory.c:2162 [inline]
zap_p4d_range mm/memory.c:2183 [inline]
__zap_vma_range+0x273e/0x2ed0 mm/memory.c:2223
unmap_vmas+0x216/0x310 mm/memory.c:2292
exit_mmap+0x1a2/0x650 mm/mmap.c:1315
__mmput+0x28/0x1f0 kernel/fork.c:1192
mmput+0x51/0x60 kernel/fork.c:1215
exit_mm+0x12d/0x1d0 kernel/exit.c:586
do_exit+0x44a/0x1530 kernel/exit.c:967
do_group_exit+0xfe/0x140 kernel/exit.c:1123
get_signal+0xc49/0xd30 kernel/signal.c:3113
arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
exit_to_user_mode_loop+0x161/0x940 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
do_syscall_64+0x23b/0x3a0 arch/x86/entry/syscall_64.c:107
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5440 Comm: syz.1.454 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
next reply other threads:[~2026-11-22 0:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 0:18 syzbot [this message]
2026-11-22 6:48 ` [syzbot] [trace?] KCSAN: data-race in __trace_trigger_soft_disabled / apply_subsystem_event_filter Masami Hiramatsu (Google)
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=6b0234dc.44b41460.34b83f.0019.GAE@google.com \
--to=syzbot+1faa12be48036b80e416@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.