CVE-2021-47433 btrfs: fix abort logic in btrfs_replace_file_extents

High 8.1 Published Updated

A logic error in the Linux kernel's btrfs filesystem can lead to file system corruption and missing extents during specific operations.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-47433?

CVE-2021-47433 is a high-severity vulnerability in Linux kernel, published on 22 May 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Which versions are affected by CVE-2021-47433?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47433?

Apply the vendor's patch.

Is CVE-2021-47433 being exploited?

There is no known exploitation of CVE-2021-47433 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47433, GHSA-6x3x-fg57-3vcm, UBUNTU-CVE-2021-47433.

Is CVE-2021-47433 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free