What’s Vulnerable › Vulnerabilities
CVE-2021-47433: btrfs: fix abort logic in btrfs_replace_file_extents
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-05-22 · updated 2026-08-04
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 products
- Linux kernel: before 5.10.75; from 5.11 before 5.14.14; 5.15-rc1, 5.15-rc2, 5.15-rc3, 5.15-rc4, 5.15-rc5 — fixed in 5.10.75, 5.14.14
How to fix
Upgrade to a fixed version: Linux kernel 5.10.75, 5.14.14. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/0e309e1152fc34ef75991d9d69b165dbf75bf26c
- https://git.kernel.org/stable/c/0e32a2b85c7d92ece86c17dfef390c5ed79c6378
- https://git.kernel.org/stable/c/4afb912f439c4bc4e6a4f3e7547f2e69e354108f
- https://git.kernel.org/stable/c/0e309e1152fc34ef75991d9d69b165dbf75bf26c
- https://git.kernel.org/stable/c/0e32a2b85c7d92ece86c17dfef390c5ed79c6378
- https://git.kernel.org/stable/c/4afb912f439c4bc4e6a4f3e7547f2e69e354108f
Get alerted when CVE-2021-47433 or the next vulnerability affects your stack