Skip to content

Commit 573b1e3

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 316b090 commit 573b1e3

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
@@ -239,6 +239,10 @@ static int dyn_event_open(struct inode *inode, struct file *file)
239239
{
240240
int ret;
241241

242+
ret = security_locked_down(LOCKDOWN_TRACEFS);
243+
if (ret)
244+
return ret;
245+
242246
ret = tracing_check_open_get_tr(NULL);
243247
if (ret)
244248
return ret;

0 commit comments

Comments
 (0)