CVE-2021-47433

btrfs: fix abort logic in btrfs_replace_file_extents

MEDIUM
5.5
CVSS Score
Published: May 22, 2024 at 06:19 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.6%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix abort logic in btrfs_replace_file_extents Error injection testing uncovered a case where we'd end up with a corrupt file system with a missing extent in the middle of a file. This occurs because the if statement to decide if we should abort is wrong. The only way we would abort in this case is if we got a ret != -EOPNOTSUPP and we called from the file clone code. However the prealloc code uses this path too. Instead we need to abort if there is an error, and the only error we _don't_ abort on is -EOPNOTSUPP and only if we came from the clone file code.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 5.10.755.10 ≤ v < 5.10.755.10 ≤ v < 5.14.145.10 ≤ v < 5.155.11 ≤ v < 5.14.145.15 rc15.15 rc25.15 rc35.15 rc45.15 rc58fccebfa534c7984864394fa03608305e4929aae
Vendor states this is fixed in 0e309e1152fc34ef75991d9d69b165dbf75bf26c (fixed)
Vendor states this is fixed in 0e32a2b85c7d92ece86c17dfef390c5ed79c6378 (fixed)
Vendor states this is fixed in 4afb912f439c4bc4e6a4f3e7547f2e69e354108f (fixed)
Vendor states this is fixed in 5.10 (unaffected)
Vendor states this is fixed in 5.10.75 (unaffected)
Vendor states this is fixed in 5.14.14 (unaffected)
Vendor states this is fixed in 5.15 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0e309e1152fc34ef75991d9d69b165dbf75bf26c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0e32a2b85c7d92ece86c17dfef390c5ed79c6378
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4afb912f439c4bc4e6a4f3e7547f2e69e354108f

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card