btrfs: do not free data reservation in fallback from inline due to -ENOSPC
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
btrfs: do not free data reservation in fallback from inline due to -ENOSPC
If we fail to create an inline extent due to -ENOSPC, we will attempt to go through the normal COW path, reserve an extent, create an ordered extent, etc. However we were always freeing the reserved qgroup data, which is wrong since we will use data. Fix this by freeing the reserved qgroup data in __cow_file_range_inline() only if we are not doing the fallback (ret is <= 0).
From the CVE record · Linux
The Linux kernel’s btrfs code incorrectly frees reserved qgroup data when an inline extent fails with -ENOSPC and falls back to the normal copy-on-write path. The input does not specify how an attacker could trigger this condition or whether network access, authentication, or user interaction is required.
Administrators running Linux kernels with btrfs should check whether their kernel includes the fix; affected versions are not specified.