CVE-2024-50273: btrfs: reinitialize delayed ref list after deleting it from the list
In the Linux kernel, the following vulnerability has been resolved:
btrfs: reinitialize delayed ref list after deleting it from the list
At insert_delayed_ref() if we need to update the action of an existing
ref to BTRFS_DROP_DELAYED_REF, we delete the ref from its ref head's
ref_add_list using list_del(), which leaves the ref's add_list member
not reinitialized, as list_del() sets the next and prev members of the
list to LIST_POISON1 and LIST_POISON2, respectively.
If later we end up calling drop_delayed_ref() against the ref, which can
happen during merging or when destroying delayed refs due to a transaction
abort, we can trigger a crash since at drop_delayed_ref() we call
list_empty() against the ref's add_list, which returns false since
the list was not reinitialized after the list_del() and as a consequence
we call list_del() again at drop_delayed_ref(). This results in an
invalid list access since the next and prev members are set to poison
pointers, resulting in a splat if CONFIG_LIST_HARDENED and
CONFIG_DEBUG_LIST are set or invalid poison pointer dereferences
otherwise.
So fix this by deleting from the list with list_del_init() instead.
Security readout for executives and security teams
Plain-English summary
A Linux btrfs bookkeeping error can make the kernel process an already-deleted list entry, causing invalid memory access and potentially crashing the system. Exploitation requires local access and relevant btrfs activity. Systems not using btrfs are less likely to reach the vulnerable code, although installed kernel exposure still requires verification.
Executive priority
Prioritize internet-facing, multi-user, or shared-compute Linux systems using btrfs because local low-privileged access may lead to kernel failure. Treat isolated systems without btrfs use as lower operational urgency, but still verify package status. Coordinate remediation through normal kernel maintenance and reboot procedures.
Technical view
When an existing delayed reference changes to BTRFS_DROP_DELAYED_REF, list_del() leaves poisoned pointers in add_list. A later drop_delayed_ref() can treat that node as linked and delete it again, producing invalid pointer access. The upstream correction uses list_del_init() so the node is reinitialized after removal.
Likely exposure
Exposure is most plausible on systems running an affected Linux kernel and exercising btrfs delayed-reference processing, including transaction merging or abort handling. The bundle identifies affected upstream releases through 6.12, but distribution kernels commonly backport fixes; determine exposure from the running package and vendor records rather than version strings alone.
Exploitation context
CVSS 3.1 scores this 7.8 with local access, low privileges, low complexity, and no user interaction. The supplied evidence describes a kernel crash or invalid pointer dereference but provides no exploit demonstration. The CVE is not listed as KEV in the bundle, and active exploitation is not established.
Researcher notes
The failure is a delayed-reference list lifecycle error consistent with CWE-908: list_del() poisons links without restoring an empty-list state. Subsequent list_empty() and list_del() handling can dereference poison pointers. Debug or list-hardening configurations produce a diagnostic splat; other configurations may encounter invalid dereferences. The sources do not establish reliable code execution or exploitation in the wild.
Mitigation direction
Update to a vendor-supported kernel package containing the applicable upstream stable fix.
Reboot affected systems into the corrected kernel after installation.
Consult distribution guidance to confirm which kernel package includes the backport.
Until updated, restrict untrusted local access to btrfs hosts and monitor kernel faults.
Validation and detection
Inventory running kernel builds and identify systems mounting or actively using btrfs.
Map distribution kernel packages to vendor advisories or changelogs instead of relying only on upstream versions.
Confirm the applicable fix commit or vendor backport is present.
After rebooting, verify the corrected kernel is running and review logs for related list or btrfs faults.
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-908: 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.
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-908 · source CWE mapping
Use of Uninitialized Resource
Use of Uninitialized Resource represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.