CVE-2026-31519
kernel: btrfs: set BTRFS_ROOT_ORPHAN_CLEANUP during subvol create
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 22, 2026
Updated · June 28, 2026
Description
A flaw was found in the Linux kernel's Btrfs filesystem. A race condition, a situation where the outcome depends on the sequence or timing of uncontrollable events, can occur during the creation and cleanup of subvolumes. This can result in a valid subvolume being incorrectly marked as a broken entry in the directory cache, preventing its deletion or the creation of new data in its location. This issue can lead to a denial of service, potentially causing the filesystem to become unresponsive or abort.
Statement
Setting BTRFS_ROOT_ORPHAN_CLEANUP during create_subvol() closes the race where the first real orphan cleanup could fail with -ENOENT and splice a negative dentry for a healthy subvolume. Red Hat advises Btrfs users to take patched kernels for metadata reliability. Unload/use avoidance of btrfs is rarely practical where the root fs is btrfs.
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
To mitigate this issue, prevent the btrfs module from being loaded. See https://access.redhat.com/solutions/41278 for instructions.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race Condition