CVE-2025-39689

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

State
Published
Severity
7.8 High
Published
Sep 5, 2025
Updated
Oct 15, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • c20489dad156dd9919ebd854bbace46dbd2576a3 to before 12064e1880fc9202be75ff668205b1703d92f74fAffected
  • c20489dad156dd9919ebd854bbace46dbd2576a3 to before c4cd93811e038d19f961985735ef7bb128078dfbAffected
  • c20489dad156dd9919ebd854bbace46dbd2576a3 to before e0b6b223167e1edde5c82edf38e393c06eda1f13Affected
  • c20489dad156dd9919ebd854bbace46dbd2576a3 to before a40c69f4f1ed96acbcd62e9b5ff3a596f0a91309Affected
  • c20489dad156dd9919ebd854bbace46dbd2576a3 to before 3b114a3282ab1a12cb4618a8f45db5d7185e784aAffected
  • c20489dad156dd9919ebd854bbace46dbd2576a3 to before c591ba1acd081d4980713e47869dd1cc3d963d19Affected
  • c20489dad156dd9919ebd854bbace46dbd2576a3 to before 64db338140d2bad99a0a8c6a118dd60b3e1fb8cbAffected
  • c20489dad156dd9919ebd854bbace46dbd2576a3 to before bfb336cf97df7b37b2b2edec0f69773e06d11955Affected
LinuxLinux
  • 4.12Affected
  • before 4.12Not affected
  • 5.4.297 through 5.4.*Not affected
  • 5.10.241 through 5.10.*Not affected
  • 5.15.190 through 5.15.*Not affected
  • 6.1.149 through 6.1.*Not affected
  • 6.6.103 through 6.6.*Not affected
  • 6.12.44 through 6.12.*Not affected
  • 6.16.4 through 6.16.*Not affected
  • 6.17 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.