CVE Database›CVE-2024-50273

CVE-2024-50273

kernel: btrfs: reinitialize delayed ref list after deleting it from the list

Loading…

Severity

Low

Red Hat Product Security

5.5

CVSS 3.1

Review impact separately from score.

Published · November 19, 2024

Updated · October 17, 2026

Description

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.

Statement

A low severity flaw was found in the Linux kernel's btrfs delayed reference handling. When an existing delayed reference is updated to BTRFS_DROP_DELAYED_REF in insert_delayed_ref(), the reference is deleted from its ref head's ref_add_list with list_del() without reinitializing the list entry. If drop_delayed_ref() is later called against that reference, which can happen while merging delayed references or when destroying delayed references after a transaction abort, list_del() is invoked a second time on the already-deleted, poisoned list entry. This results in an invalid list access that crashes the kernel. A local user with the ability to trigger the affected btrfs code path could use this flaw to cause a denial of service; confidentiality and integrity are not impacted. Red Hat Product Security rates this flaw as Low severity because exploitation requires local privileged access to the vulnerable btrfs path and affects only system availability, which differs from the higher CVSS score published in the upstream CVE record. In the current Red Hat record, all Red Hat Enterprise Linux 8 and 9 kernel and kernel-rt streams are listed as NOT AFFECTED, and Red Hat Enterprise Linux 6 and 7 ELS streams are out of active support scope. The flaw is recorded as affecting the Fedora community kernel, where the fix is being pursued by the community as part of the delegated resolution.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

CVSS / CWE

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

CWE-908 · Use of Uninitialized Resource