CVE-2021-47433

published 22 May 2024 · updated 5 Aug 2026

btrfs: fix abort logic in btrfs_replace_file_extents

8.1HighCVSS 8.1EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in Kernel 0e309e1152fc34ef75991d9d69b165dbf75bf26c, Kernel 0e32a2b85c7d92ece86c17dfef390c5ed79c6378 and Kernel 4afb912f439c4bc4e6a4f3e7547f2e69e354108f.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
LinuxKernel=5.10, >=8fccebfa534c7984864394fa03608305e4929aae <0e309e1152fc34ef75991d9d69b165dbf75bf26c, >=8fccebfa534c7984864394fa03608305e4929aae <0e32a2b85c7d92ece86c17dfef390c5ed79c6378, >=8fccebfa534c7984864394fa03608305e4929aae <4afb912f439c4bc4e6a4f3e7547f2e69e354108f0e309e1152fc34ef75991d9d69b165dbf75bf26c, 0e32a2b85c7d92ece86c17dfef390c5ed79c6378, 4afb912f439c4bc4e6a4f3e7547f2e69e354108f

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Kernel, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2021-47433 severity on Zeptric[![CVE-2021-47433](https://zeptric.io/badge/cve/CVE-2021-47433.svg)](https://zeptric.io/cve/CVE-2021-47433)