VYPR
High severity7.8NVD Advisory· Published Sep 5, 2025· Updated May 12, 2026

CVE-2025-39689

CVE-2025-39689

Description

In the Linux kernel, the following vulnerability has been resolved:

ftrace: Also allocate and copy hash for reading of filter files

Currently the reader of set_ftrace_filter and set_ftrace_notrace just adds the pointer to the global tracer hash to its iterator. Unlike the writer that allocates a copy of the hash, the reader keeps the pointer to the filter hashes. This is problematic because this pointer is static across function calls that release the locks that can update the global tracer hashes. This can cause UAF and similar bugs.

Allocate and copy the hash for reading the filter files like it is done for the writers. This not only fixes UAF bugs, but also makes the code a bit simpler as it doesn't have to differentiate when to free the iterator's hash between writers and readers.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel's ftrace, reading filter files without copying the global hash can cause a use-after-free, potentially leading to memory corruption and privilege escalation.

The vulnerability exists in the Linux kernel's ftrace subsystem. When reading the set_ftrace_filter or set_ftrace_notrace files, the reader used a pointer directly to the global tracer hash without making a local copy. This pointer remained static across function calls that release locks, allowing the hash to be modified concurrently and causing a use-after-free bug.

Exploitation requires local access to the ftrace files and the ability to trigger a race condition where the filter hash is updated while another thread reads the file. This can be achieved by a local attacker with sufficient privileges to access these files and perform concurrent modifications.

A successful exploit can lead to memory corruption, potentially resulting in privilege escalation or a system crash. The vulnerability has been assigned a CVSS score of 7.8 (High).

The fix allocates and copies the hash for reading, similar to the writer's approach, thereby preventing the use-after-free. Patches are available from the Linux kernel stable repository.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

12

News mentions

1