mirror of
https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10.git
synced 2026-09-09 00:07:04 +08:00
tracing: dynevent: Add a missing lockdown check on dynevent
JIRA: https://issues.redhat.com/browse/RHEL-151695
CVE: CVE-2025-40021
commit 456c32e3c4316654f95f9d49c12cbecfb77d5660
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: Fri Sep 19 10:15:56 2025 +0900
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: 17911ff38a ("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: Jerome Marchand <jmarchan@redhat.com>
This commit is contained in:
@@ -239,6 +239,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;
|
||||
|
||||
Reference in New Issue
Block a user