Skip to content

Commit f3ac1f4

Browse files
mhiramatgregkh
authored andcommitted
tracing: dynevent: Add a missing lockdown check on dynevent
commit 456c32e upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3cb18cf commit f3ac1f4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

kernel/trace/trace_dynevent.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ static int dyn_event_open(struct inode *inode, struct file *file)
176176
{
177177
int ret;
178178

179+
ret = security_locked_down(LOCKDOWN_TRACEFS);
180+
if (ret)
181+
return ret;
182+
179183
ret = tracing_check_open_get_tr(NULL);
180184
if (ret)
181185
return ret;

0 commit comments

Comments
 (0)