aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasami Hiramatsu (Google) <[email protected]>2025-09-19 01:15:56 +0000
committerSteven Rostedt (Google) <[email protected]>2025-09-23 15:02:14 +0000
commit1da3f145ede481607a93472d2a1f597d6e998eb4 (patch)
tree3e2bd05ae2881b7c36c45a497a77614a4b854cfa
parenttracing/osnoise: Fix slab-out-of-bounds in _parse_integer_limit() (diff)
downloadkernel-1da3f145ede481607a93472d2a1f597d6e998eb4.tar.gz
kernel-1da3f145ede481607a93472d2a1f597d6e998eb4.zip
tracing: dynevent: Add a missing lockdown check on dynevent
Since dynamic_events interface on tracefs is compatible with kprobe_events and uprobe_events, it should also check the lockdown status and reject if it is set. Cc: Mathieu Desnoyers <[email protected]> Link: https://lore.kernel.org/175824455687.45175.3734166065458520748.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
-rw-r--r--kernel/trace/trace_dynevent.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/trace_dynevent.c b/kernel/trace/trace_dynevent.c
index 5d64a18cacac..d06854bd32b3 100644
--- a/kernel/trace/trace_dynevent.c
+++ b/kernel/trace/trace_dynevent.c
@@ -230,6 +230,10 @@ static int dyn_event_open(struct inode *inode, struct file *file)
{
int ret;
+ ret = security_locked_down(LOCKDOWN_TRACEFS);
+ if (ret)
+ return ret;
+
ret = tracing_check_open_get_tr(NULL);
if (ret)
return ret;