CVE-2024-42314: btrfs: fix extent map use-after-free when adding pages to compressed bio
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix extent map use-after-free when adding pages to compressed bio
At add_ra_bio_pages() we are accessing the extent map to calculate
'add_size' after we dropped our reference on the extent map, resulting
in a use-after-free. Fix this by computing 'add_size' before dropping our
extent map reference.
Security readout for executives and security teams
Plain-English summary
CVE-2024-42314 is a Linux kernel memory-safety flaw in Btrfs. Under specific compressed I/O activity, the kernel can access an object after releasing it. A local, low-privileged user may be able to trigger serious confidentiality, integrity, or availability consequences. Exposure depends on the installed kernel and use of Btrfs.
Executive priority
Treat as a high-priority kernel maintenance issue on multi-user or untrusted-workload systems using Btrfs. Patch through supported distribution channels promptly, with faster handling where local users or workloads are not fully trusted. Lower urgency may be reasonable when Btrfs is absent, after verification.
Technical view
The Btrfs add_ra_bio_pages() path calculated add_size from an extent map after releasing its reference, creating a use-after-free. The kernel fix moves that calculation before the reference is dropped. CVSS 3.1 rates the issue 7.8 with local access, low complexity, low privileges, no user interaction, and high potential impact.
Likely exposure
Prioritize Linux systems using Btrfs and potentially exercising compressed read-ahead paths. The supplied version data identifies Linux 5.16 and several later branch versions but is ambiguous about exact fixed boundaries. Confirm distributor package status or whether the running kernel incorporates a referenced stable fix.
Exploitation context
The CVSS vector requires local access and low privileges. The supplied sources provide no evidence of active exploitation, public weaponization, or remote reachability, and the CVE is not listed as KEV in the bundle. Practical exploitability is therefore unconfirmed.
Researcher notes
The source bundle contains duplicated commit identifiers and a flattened affected-version list that does not clearly express branch ranges. Avoid inferring exact vulnerable boundaries from those fields alone. Compare downstream package backports against the four stable commits. No CWE was supplied, although the description explicitly identifies a use-after-free.
Mitigation direction
Update to a vendor-supported kernel package containing the applicable referenced stable fix.
Reboot affected systems so the corrected kernel is actually running.
Follow Linux distributor guidance for package-specific fixed versions.
If patching is delayed, consult vendor guidance; the supplied sources name no temporary mitigation.
Validation and detection
Inventory running kernel releases and systems with Btrfs filesystems.
Map distributor kernel packages to the referenced upstream stable fixes.
After updating, verify the running kernel changed following reboot.
Review kernel logs for Btrfs faults, noting their absence does not prove safety.
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-2024-42314 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.
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.