CVE-2025-21879: btrfs: fix use-after-free on inode when scanning root during em shrinking
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix use-after-free on inode when scanning root during em shrinking
At btrfs_scan_root() we are accessing the inode's root (and fs_info) in a
call to btrfs_fs_closing() after we have scheduled the inode for a delayed
iput, and that can result in a use-after-free on the inode in case the
cleaner kthread does the iput before we dereference the inode in the call
to btrfs_fs_closing().
Fix this by using the fs_info stored already in a local variable instead
of doing inode->root->fs_info.
Security readout for executives and security teams
Plain-English summary
CVE-2025-21879 is a high-severity Linux kernel Btrfs memory-safety flaw. A local low-privileged user may be able to trigger memory corruption with serious confidentiality, integrity, and availability impact. The supplied sources do not show active exploitation or CISA KEV listing.
Executive priority
Treat as high priority for Linux fleets with local users, shared hosting, developer workstations, or container platforms. It is not described as remotely exploitable in the supplied evidence, but kernel memory corruption can materially affect host security boundaries.
Technical view
In btrfs_scan_root(), the kernel could schedule an inode for delayed iput, then later dereference inode->root->fs_info via btrfs_fs_closing(). If the cleaner thread releases the inode first, this creates a use-after-free. The fix uses an already stored local fs_info pointer.
Likely exposure
Likely exposure is Linux systems running affected kernel versions, particularly 6.13 before fixed stable updates and 6.14 as listed. The bundle does not identify affected distributions, default Btrfs usage requirements, or package-level fixed versions.
Exploitation context
The CVSS vector is local, low complexity, low privilege, no user interaction, with high impact across confidentiality, integrity, and availability. KEV is false, and the provided sources contain no evidence of in-the-wild exploitation.
Researcher notes
Evidence supports a Btrfs kernel use-after-free caused by lifetime ordering around delayed iput and later inode field access. Public data is incomplete on exploitability prerequisites, affected distributions, and runtime configuration requirements, so validation should stay source- and vendor-advisory driven.
Mitigation direction
Apply Linux kernel updates containing the referenced stable fixes.
Check your Linux distribution advisory for fixed package versions.
Prioritize systems allowing local shell, container, or multi-user access.
Review Btrfs usage and exposure on affected kernel fleets.
If no vendor package exists, follow vendor kernel mitigation guidance.
Validation and detection
Inventory kernel versions across Linux hosts.
Identify systems using or loading Btrfs functionality.
Compare installed kernels with vendor fixed-version advisories.
Confirm remediation includes the referenced stable commit lineage.
Track CVE-2025-21879 for distro-specific backport status.
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-416: 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.
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
4Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
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.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-416 · source CWE mapping
Use After Free
Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.