CVE-2021-47433

btrfs: fix abort logic in btrfs_replace_file_extents

State
Published
Severity
8.1 High
Published
May 22, 2024
Updated
Aug 5, 2026
Reserved
May 21, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.18.1 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 8fccebfa534c7984864394fa03608305e4929aae to before 0e32a2b85c7d92ece86c17dfef390c5ed79c6378Affected
  • 8fccebfa534c7984864394fa03608305e4929aae to before 0e309e1152fc34ef75991d9d69b165dbf75bf26cAffected
  • 8fccebfa534c7984864394fa03608305e4929aae to before 4afb912f439c4bc4e6a4f3e7547f2e69e354108fAffected
LinuxLinux
  • 5.10Affected
  • before 5.10Not affected
  • 5.10.75 through 5.10.*Not affected
  • 5.14.14 through 5.14.*Not affected
  • 5.15 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.