CVE-2025-38382: btrfs: fix iteration of extrefs during log replay
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix iteration of extrefs during log replay
At __inode_add_ref() when processing extrefs, if we jump into the next
label we have an undefined value of victim_name.len, since we haven't
initialized it before we did the goto. This results in an invalid memory
access in the next iteration of the loop since victim_name.len was not
initialized to the length of the name of the current extref.
Fix this by initializing victim_name.len with the current extref's name
length.
Security readout for executives and security teams
Plain-English summary
A Linux Btrfs flaw can cause invalid kernel memory access while replaying a filesystem log. Successful exploitation requires local, low-privileged access according to the supplied CVSS data, so this is not documented as a direct remote entry point. Consequences are rated severe for confidentiality, integrity, and availability, although the bundle does not establish a specific exploitation outcome.
Executive priority
Treat this as a high-priority kernel maintenance issue for Btrfs systems, especially multi-user hosts and platforms running untrusted local workloads. It does not warrant remote-exploitation emergency handling based on current evidence. Accelerate normal patching, confirm successful reboot into the corrected kernel, and document any systems deferred because of operational constraints.
Technical view
During Btrfs log replay, __inode_add_ref() can jump to its next processing label before victim_name.len is initialized. The following extended-reference iteration then uses an undefined length, causing invalid memory access. The published fix initializes the field from the current extended reference's name length.
Likely exposure
Exposure is most likely on systems running affected Linux kernel builds and using Btrfs where log replay processes extended references. The supplied version data contains unusual and duplicated entries, while distributions may backport fixes. Validate the running distribution package against vendor advisories or referenced fix commits rather than relying only on upstream version numbers.
Exploitation context
No active exploitation is established by the supplied sources, and the bundle marks the CVE as absent from KEV. The CVSS vector describes a local, low-complexity attack requiring low privileges and no user interaction. No public exploit, attack chain, or confirmed real-world compromise is identified in the evidence provided.
Researcher notes
The root cause is an uninitialized length used across an extended-reference iteration during Btrfs log replay. No CWE is supplied. Multiple stable-kernel fix references are listed, but the affected-version representation is not sufficiently clear for definitive package-level conclusions. The evidence establishes invalid memory access and a high CVSS rating, not a demonstrated exploitation primitive.
Mitigation direction
Apply a distribution-supported kernel update incorporating the referenced upstream Btrfs fix.
Prioritize Btrfs hosts that permit untrusted local users or workloads.
If updates are delayed, follow vendor guidance and reduce untrusted local access to affected Btrfs hosts.
Validation and detection
Inventory running kernel builds and identify systems with mounted Btrfs filesystems.
Check distribution advisories or package changelogs for this CVE or a referenced stable commit.
Reboot updated systems and confirm the fixed kernel package is actively running.
Review kernel logs for Btrfs errors, oopses, or memory-access failures associated with log replay.
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.
cve · low confidence lookup
CVE-2025-38382 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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.
1CVSS vectors
3Timeline events
1ADP providers
7Source links
CVSS vector scores
1 official score
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.