LiveActive security incident?Get immediate response
CVE Record

CVE-2025-39840: audit: fix out-of-bounds read in audit_compare_dname_path()

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]

HighCVSS 7.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A Linux kernel audit bug can read outside valid memory when a root-directory audit watch encounters certain short filenames. A local, low-privileged user may be able to trigger confidentiality or availability impacts. Risk is concentrated on affected kernels using this audit configuration.

Executive priority

Prioritize affected multi-user, shared-hosting, and other systems permitting untrusted local access. Patch through normal expedited kernel maintenance; escalate where root-directory audit watches and exposed local accounts coexist.

Technical view

CVE-2025-39840 is a CWE-125 out-of-bounds read in audit_compare_dname_path(). When parent_len() and the full path length are both one, pathlen becomes zero before p[pathlen-1] is evaluated. The upstream correction requires pathlen to remain greater than zero during the loop.

Likely exposure

Exposure requires an affected Linux kernel, local low-privileged access, and an audit watch on dir=/. The supplied affected-version metadata is ambiguous, so organizations should map their exact distribution kernel package to vendor guidance or the referenced fixes.

Exploitation context

The CVSS 3.1 score is 7.1 with local, low-complexity, low-privilege access and potential high confidentiality and availability impact. The bundle marks this CVE as absent from KEV and provides no evidence of active exploitation or a public exploit.

Researcher notes

The boundary condition occurs after pathlen is reduced from one to zero, followed by an index of negative one. The fix adds a pathlen > 0 loop guard. The supplied sources do not establish practical information disclosure, reliable crashing, affected distribution packages, or exploitation in the wild.

Mitigation direction

  • Install a vendor-supported kernel update containing the upstream correction.
  • Map distribution kernel packages to the referenced stable commits or vendor advisories.
  • Until patched, avoid dir=/ audit watches where operationally and security-wise acceptable.
  • Limit untrusted local account access where patching cannot occur promptly.

Validation and detection

  • Inventory running kernel versions across Linux systems.
  • Identify systems configured with audit watches targeting dir=/.
  • Confirm vendor packages include the pathlen guard or referenced stable fix.
  • Reboot updated systems and verify the patched kernel is running.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-125: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2025-39840 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.1 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
3Timeline events
1ADP providers
3Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.1CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H1.85.2Linux
7.1CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H1.85.2CISA-ADP

Vulnerability scoring details

Base CVSS 3.1 score

7.1High
CVSS 3.1 vector shape for CVE-2025-39840Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxe92eebb0d6116f942ab25dfb1a41905aa59472a8, e92eebb0d6116f942ab25dfb1a41905aa59472a8unaffected
LinuxLinux6.14, 0, 6.16.6, 6.17affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-125 · source CWE mapping

Out-of-bounds Read

Out-of-bounds Read represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.