From: Steven Rostedt <rostedt@goodmis.org>
To: Breno Leitao <leitao@debian.org>
Cc: mark.rutland@arm.com, mhiramat@kernel.org,
linux-trace-kernel@vger.kernel.org
Subject: Re: ftrace: UAF in ftrace_regex_open() on a removed tracing instance
Date: Fri, 28 Aug 2026 10:42:01 -0400 [thread overview]
Message-ID: <20260828104201.21aa9d08@gandalf.local.home> (raw)
In-Reply-To: <apGORjltZgAiAYHT@gmail.com>
On Fri, 28 Aug 2026 06:38:17 -0700
Breno Leitao <leitao@debian.org> wrote:
> I am seeing some UAF KASAN issue on ftrace in Meta prod, and I think
> I got a reproducer that works ok.
>
> BUG: KASAN: slab-use-after-free in ftrace_regex_open+0x50/0x770
> Read of size 8 at addr ffff00097627f418 by task stress-ng-fanot/1811644
>
> #define TRACEFS "/sys/kernel/tracing"
> #define INSTANCE TRACEFS "/instances/uaf"
> #define TARGET INSTANCE "/set_ftrace_filter"
Ugg, this is similar to the bug I just fixed[1]. But this one will not be
so trivial to solve. As the trace_array in question owns the ftrace_ops
that is used to register the set_ftrace_filter file. Upping the reference
to the trace_array will require some thought.
Let me look deeper at it.
-- Steve
[1] https://lore.kernel.org/all/20260828094153.17b95037@gandalf.local.home/
next prev parent reply other threads:[~2026-08-28 14:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 13:38 ftrace: UAF in ftrace_regex_open() on a removed tracing instance Breno Leitao
2026-08-28 14:42 ` Steven Rostedt [this message]
2026-08-28 15:59 ` Breno Leitao
2026-08-28 16:34 ` Steven Rostedt
2026-08-28 16:34 ` Steven Rostedt
2026-08-28 17:49 ` Steven Rostedt
2026-08-28 18:04 ` Steven Rostedt
2026-08-28 19:55 ` Steven Rostedt
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=20260828104201.21aa9d08@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=leitao@debian.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
/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