CVE-2025-39840
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-19

Last updated on: 2025-12-12

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: audit: fix out-of-bounds read in audit_compare_dname_path() When a watch on dir=/ is combined with an fsnotify event for a single-character name directly under / (e.g., creating /a), an out-of-bounds read can occur in audit_compare_dname_path(). The helper parent_len() returns 1 for "/". In audit_compare_dname_path(), when parentlen equals the full path length (1), the code sets p = path + 1 and pathlen = 1 - 1 = 0. The subsequent loop then dereferences p[pathlen - 1] (i.e., p[-1]), causing an out-of-bounds read. Fix this by adding a pathlen > 0 check to the while loop condition to prevent the out-of-bounds access. [PM: subject tweak, sign-off email fixes]
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-19
Last Modified
2025-12-12
Generated
2026-05-07
AI Q&A
2025-09-19
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 6.14 (inc) to 6.16.6 (exc)
linux linux_kernel 6.17
linux linux_kernel 6.17
linux linux_kernel 6.17
linux linux_kernel 6.17
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is an out-of-bounds read in the Linux kernel's audit subsystem, specifically in the function audit_compare_dname_path(). It occurs when a watch on the root directory (/) is combined with a filesystem notification event involving a single-character name directly under /. Due to incorrect handling of path length, the code reads memory outside the intended bounds, which can lead to unexpected behavior or crashes. The issue was fixed by adding a check to ensure the path length is greater than zero before accessing the memory.


How can this vulnerability impact me? :

This vulnerability can cause the Linux kernel audit subsystem to perform an out-of-bounds read, potentially leading to system instability, crashes, or undefined behavior. While the description does not specify exploitation details, such memory errors can be leveraged to cause denial of service or potentially escalate privileges depending on the context.


What immediate steps should I take to mitigate this vulnerability?

Apply the patch or update to the Linux kernel version that includes the fix for the out-of-bounds read in audit_compare_dname_path(). Avoid setting watches on dir=/ combined with fsnotify events for single-character names until the fix is applied.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart