From: Antoine Tenart <atenart@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
vmalik@redhat.com, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org,
"Uladzislau Rezki (Sony)" <urezki@gmail.com>
Subject: Re: [PATCH] tracing/probes: fix race between probe execution and event unregistering
Date: Wed, 2 Dec 2026 09:39:46 +0100 [thread overview]
Message-ID: <aw_ZBLSXlIB2bhNw@toolbx> (raw)
In-Reply-To: <20261201085848.33796693@gandalf.local.home>
On Tue, Dec 01, 2026 at 08:58:48AM -0500, Steven Rostedt wrote:
> On Tue, 1 Dec 2026 14:21:21 +0100
> Antoine Tenart <atenart@kernel.org> wrote:
>
> > > @@ -2841,7 +2850,7 @@ int trace_probe_remove_file(struct trace_probe *tp,
> > > return -ENOENT;
> > >
> > > list_del_rcu(&link->list);
> > > - kvfree_rcu_mightsleep(link);
> > > + call_rcu(&link->rcu, free_link_rcu);
> >
> > While this defers freeing file, this unfortunately won't work because
> > this is not only about struct trace_event_file but also the pointers it
> > contains and the lifetime of those objects. E.g. accessing file->filter
> > will also cause UaF in trace_event_buffer_commit ->
> > __event_trigger_test_discard. (I haven't looked at the other pointers,
> > they might be problematic too).
>
> Then those need to be fixed as well.
All right. I was concerned about missing one, but I guess adding back a
costly call isn't an option. I'll cook a series and try not to miss a
path then.
Thanks!
Antoine
prev parent reply other threads:[~2026-12-02 8:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 13:28 Antoine Tenart
2026-11-27 19:06 ` Steven Rostedt
2026-11-28 2:31 ` Masami Hiramatsu (Google)
2026-12-01 13:21 ` Antoine Tenart
2026-12-01 13:58 ` Steven Rostedt
2026-12-02 8:39 ` Antoine Tenart [this message]
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=aw_ZBLSXlIB2bhNw@toolbx \
--to=atenart@kernel.org \
--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=urezki@gmail.com \
--cc=vmalik@redhat.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
all inboxes | Powered by JetHome®