CVE-2025-39689 ftrace: Also allocate and copy hash for reading of filter files
A use-after-free vulnerability in the Linux kernel ftrace subsystem allows attackers to potentially execute arbitrary code or escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-39689?
CVE-2025-39689 is a high-severity use after free vulnerability in Debian Debian Linux, published on 5 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-416
Which versions are affected by CVE-2025-39689?
It affects 2 products.
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2025-39689?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2025-39689 being exploited?
There is no known exploitation of CVE-2025-39689 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as AZL-66962, AZL-73707, BELL-CVE-2025-39689, DEBIAN-CVE-2025-39689, GHSA-p8pm-49m7-8863, ROOT-OS-DEBIAN-11-CVE-2025-39689 and 5 more.