CVE-2025-38539: tracing: Add down_write(trace_event_sem) when adding trace event
In the Linux kernel, the following vulnerability has been resolved:
tracing: Add downwrite(traceeventsem) when adding trace event
When a module is loaded, it adds trace events defined by the module. It may also need to modify the modules trace printk formats to replace enum names with their values.
If two modules are loaded at the same time, the adding of the event to the ftraceevents list can corrupt the walking of the list in the code that is modifying the printk format strings and crash the kernel.
The addition of the event should take the traceeventsem for write while it adds the new event.
Also add a lockdepassertheld() on that semaphore in traceaddeventdirs() as it iterates the list.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38539?
CVE-2025-38539 is classified as a medium-severity vulnerability affecting the Linux kernel.
How do I fix CVE-2025-38539?
To fix CVE-2025-38539, users should update to the latest version of the Linux kernel where the vulnerability has been patched.
What systems are affected by CVE-2025-38539?
CVE-2025-38539 affects various versions of the Linux kernel that allow unauthorized modifications to trace events.
What type of vulnerability is CVE-2025-38539?
CVE-2025-38539 is a vulnerability related to improper synchronization when adding trace events in the Linux kernel.
What are the potential impacts of CVE-2025-38539?
The potential impact of CVE-2025-38539 includes the possibility of unauthorized access and modification of trace event logging in the Linux kernel.