CVE-2025-39840
HighIn 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 3.1 score
7.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Weakness type
CWE-125CVE-2025-39840 is a Out-of-bounds Read vulnerability
What is Out-of-bounds Read?
The product reads data past the end or before the beginning of the intended buffer. Learn more on MITRE CWE
Affected versions
Linux kernel versions
6.14
and later are affected. Fixed in
6.16.6,
6.17
and their respective stable series.
References
The following references provide additional information about CVE-2025-39840 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/4540f1d23e7f387880ce46d11b5cd3f27248bf8d
-
PatchKernel patch commithttps://git.kernel.org/stable/c/9735a9dcc307427e7d6336c54171682f1bac9789
Frequently asked questions
-
What is CVE-2025-39840?
CVE-2025-39840 is a High severity Linux kernel vulnerability with a CVSS score of 7.1 out of 10 , classified as an Out-of-bounds Read flaw (CWE-125) . It affects Linux kernel versions from 6.14 onward and has been patched in 6.16.6 and 6.17. CVE-2025-39840 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2025-39840?
CVE-2025-39840 has a CVSS score of 7.1 out of 10, rated High severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H. -
Is there a patch available for CVE-2025-39840?
Yes — CVE-2025-39840 has been patched. Fixed versions include 6.16.6 and 6.17. If you are running Linux kernel 6.14 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2025-39840 actively exploited?
No — CVE-2025-39840 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Out-of-bounds Read (CWE-125)?
The product reads data past the end or before the beginning of the intended buffer. View CWE-125 on MITRE CWE →