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:
Jerome Marchand
2026-03-06 09:25:14 +01:00
parent adaf72aad9
commit e39aac93f4
+4
View File
@@ -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;