CVE-2025-39840
Last modified
CVE-2025-39840 is a high-severity vulnerability rated 7.1/10 on the CVSS scale. 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. EPSS estimates a 0.14% chance of exploitation in the next 30 days.
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]
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 6.14, < 6.16.6 | — |
| Linux | Linux Kernel | 6.17 | Rc1 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2025-39840?
How severe is CVE-2025-39840?
How do I fix CVE-2025-39840?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-39835In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-39836In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-39837In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-39838In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39839In the Linux kernel, the following vulnerability has been re…7.1
- CVE-2025-3984A vulnerability was found in Apereo CAS 5.2.6 and classified…7.5
- CVE-2025-39841In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-39842In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39843In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39844In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39845In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39846In the Linux kernel, the following vulnerability has been re…5.5
Are you affected by CVE-2025-39840?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
