CVE-2025-39840
published high CVSS 3.1 · 7.1audit: fix out-of-bounds read in audit_compare_dname_path()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxe92eebb0d6116f942ab25dfb1a41905aa59472a8 to < 9735a9dcc307427e7d6336c54171682f1bac9789 · e92eebb0d6116f942ab25dfb1a41905aa59472a8 to < 4540f1d23e7f387880ce46d11b5cd3f27248bf8d · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.14 (affected) · 0 to < 6.14 (unaffected · semver) · 6.16.6 through 6.16.* (unaffected · semver) · 6.17 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| AlmaLinux | 10 | kernel-abi-stablelists | Advisory build | 6.12.0-124.27.1.el10_1 | ALSA-2026:0453 |
| Oracle Linux | 10 | kernelx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| AlmaLinux | 10 | kernel-doc | Advisory build | 6.12.0-124.27.1.el10_1 | ALSA-2026:0453 |
| AlmaLinux | 9 | kernel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
Show 96 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| AlmaLinux | 9 | kernel-64k | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-debug | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-debug-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-debug-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-debug-devel-matched | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-debug-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-debug-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-debug-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-devel-matched | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-64k-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-abi-stablelists | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-cross-headers | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-debug | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-debug-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-debug-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-debug-devel-matched | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-debug-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-debug-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-debug-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-debug-uki-virt | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-devel-matched | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-doc | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-headers | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-debug | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-debug-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-debug-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-64k-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-debug | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-debug-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-debug-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-debug-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-debug-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-debug-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-rt-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-tools | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-tools-libs | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-tools-libs-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-uki-virt | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-uki-virt-addons | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-zfcpdump | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-zfcpdump-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-zfcpdump-devel | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-zfcpdump-devel-matched | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-zfcpdump-modules | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-zfcpdump-modules-core | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | kernel-zfcpdump-modules-extra | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | libperf | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | perf | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | python3-perf | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | rtla | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| AlmaLinux | 9 | rv | Advisory build | 5.14.0-611.20.1.el9_7 | ALSA-2026:0445 |
| Oracle Linux | 10 | kernel-abi-stablelistsx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-corex86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-cross-headersaarch64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-cross-headersx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-debugx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-debug-corex86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-debug-develx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-debug-devel-matchedx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-debug-modulesx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-debug-modules-corex86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-debug-modules-extrax86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-debug-uki-virtx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-develx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-devel-matchedx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-docx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-headersaarch64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-headersx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-modulesx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-modules-corex86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-modules-extrax86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-modules-extra-matchedx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-toolsaarch64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
| Oracle Linux | 10 | kernel-toolsx86_64 | Advisory build | 0:6.12.0-124.27.1.el10_1 | ELSA-2026-0453 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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]
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.1 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
- Scenarios
- en: AV:L - The vulnerable code is reached only through the syscall audit context (`__audit_getname`/`__audit_inode_child`) or an fsnotify event on a locally-installed audit watch, both of which require issuing local syscalls such as symlink()/mkdir()/rename(). No network-facing kernel service (nfsd/ksmbd) builds audit name entries via getname(), so there is no remote path to the defect. AC:L - The attacker fully controls both inputs — an all-slash pathname argument and the basename of the created child — so the backwards walk past the start of the buffer is triggered deterministically on every attempt, with no race to win and no timing dependency. Padding the slash string to ≥EMBEDDED_NAME_MAX deterministically forces the string into a page-aligned names_cachep object, so even the page-boundary read is attacker-arranged. PR:L - Any unprivileged local user can call symlink("///…", "/tmp/x") in a world-writable directory; no capability, namespace trick, or audit privilege is needed, and the AUDIT_TYPE_UNKNOWN found_child branch bypasses the ino/dev ownership check entirely. The only precondition is a system-wide audit ruleset installed by the administrator, which is an environmental condition rather than an attacker privilege. UI:N - The attacking process performs the whole sequence itself in a single syscall; no victim has to mount a filesystem, open a file, or take any other action. S:U - The out-of-bounds read occurs in kernel heap memory and both the flaw and its consequences stay within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed. C:H - This is an out-of-bounds read that is not bounded to a few bytes — the loop keeps decrementing and dereferencing backwards for as long as the preceding kernel memory contains 0x2f bytes, so an attacker who sprays '/' bytes into the heap can extend the walk across adjacent slab objects and pages, touching arbitrary kernel memory beyond the allocation. I:N - The defect performs only reads; `pathlen` becomes negative so the comparison always returns "no match" and `memcmp()` is unreachable, leaving no memory write, no control-flow influence, and no change to the audit records that would be emitted. A:H - With a slash string long enough to occupy a page-aligned 4096-byte names_cachep object, the walk immediately dereferences the byte before a page boundary and can continue across pages, producing a kernel oops on an unmapped/guard page under KFENCE, DEBUG_PAGEALLOC, or a direct-map hole, and a fatal KASAN report on hardened kernels; it is repeatable at will by an unprivileged user.
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.1 | high | CISA-ADP · adp | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | e92eebb0d6116f942ab25dfb1a41905aa59472a8 to < 9735a9dcc307427e7d6336c54171682f1bac9789 (affected · git)e92eebb0d6116f942ab25dfb1a41905aa59472a8 to < 4540f1d23e7f387880ce46d11b5cd3f27248bf8d (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.14 (affected)0 to < 6.14 (unaffected · semver)6.16.6 through 6.16.* (unaffected · semver)6.17 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
1- CWE-125 CWE-125 Out-of-bounds Read
References
2Provider assertions
2Linux · cna
audit: fix out-of-bounds read in audit_compare_dname_path()
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 1c2f195fa3772561628e6aa3d53d789ea0669574a77ca7a36767a2ad9abd8a69
- Ingested
- 23 Sep 2026, 08:47:06 UTC
- Source record
- Official CVE record