linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 0/2] ftrace: Some minor fixes for set_ftrace_{notrace,filter} file handling
@ 2025-08-13  2:30 Tengda Wu
  2025-08-13  2:30 ` [PATCH -next 1/2] ftrace: Remove unnecessary free_ftrace_hash in ftrace_regex_open Tengda Wu
  2025-08-13  2:30 ` [PATCH -next 2/2] ftrace: Fix potential use-after-free for set_ftrace_{notrace,filter} files Tengda Wu
  0 siblings, 2 replies; 7+ messages in thread
From: Tengda Wu @ 2025-08-13  2:30 UTC (permalink / raw)
  To: Steven Rostedt, Masami Hiramatsu
  Cc: Mark Rutland, Mathieu Desnoyers, linux-trace-kernel, linux-kernel,
	Tengda Wu

Hello,

This patch series addresses two issues in the ftrace subsystem related
to the handling of set_ftrace_{notrace,filter} files.

Patch 1 removes an incorrect free_ftrace_hash call in ftrace_regex_open()
that could lead to use-after-free when seq_open fails.

Patch 2 fixes a potential use-after-free scenario that can occur during
concurrent read/write operations on the set_ftrace_{notrace,filter} files.

Both issues were reproducible. This patches aims to fix them.

Best regards,
Tengda

Tengda Wu (2):
  ftrace: Remove unnecessary free_ftrace_hash in ftrace_regex_open
  ftrace: Fix potential use-after-free for set_ftrace_{notrace,filter}
    files

 kernel/trace/ftrace.c | 28 ++++++++++++++++++++++++----
 kernel/trace/trace.h  |  2 ++
 2 files changed, 26 insertions(+), 4 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-20 13:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-13  2:30 [PATCH -next 0/2] ftrace: Some minor fixes for set_ftrace_{notrace,filter} file handling Tengda Wu
2025-08-13  2:30 ` [PATCH -next 1/2] ftrace: Remove unnecessary free_ftrace_hash in ftrace_regex_open Tengda Wu
2025-08-20  0:47   ` Steven Rostedt
2025-08-13  2:30 ` [PATCH -next 2/2] ftrace: Fix potential use-after-free for set_ftrace_{notrace,filter} files Tengda Wu
2025-08-20  1:05   ` Steven Rostedt
2025-08-20  8:34     ` Tengda Wu
2025-08-20 13:16       ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).