Skip to content

Commit 456c32e

Browse files
committed
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. Link: https://lore.kernel.org/all/175824455687.45175.3734166065458520748.stgit@devnote2/ Fixes: 17911ff ("tracing: Add locked_down checks to the open calls of files created for tracefs") Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Cc: stable@vger.kernel.org
1 parent c539fef commit 456c32e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/trace/trace_dynevent.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ static int dyn_event_open(struct inode *inode, struct file *file)
230230
{
231231
int ret;
232232

233+
ret = security_locked_down(LOCKDOWN_TRACEFS);
234+
if (ret)
235+
return ret;
236+
233237
ret = tracing_check_open_get_tr(NULL);
234238
if (ret)
235239
return ret;

0 commit comments

Comments
 (0)