btrfs: qgroup: fix a wrong length calculation in qgroup_free_reserved_data()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ bc42bda22345efdb5d8b578d1b4df2c6eaa85c58 · < 9102b179512e11644fb0489ae62010a09afa199c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
btrfs: qgroup: fix a wrong length calculation in qgroup_free_reserved_data()
In that function, we round down the start position and round up the ending position.
But during the calculation of @len, we use "round_up(start + len, sectorsize)", which is the rounded up end position, not the rounded up length.
Which results a much larger length, and later we are still using "start + len", which is completely incorrect.
Fix it by declaring a local @aligned_start and @aligned_len and use them instead.
From the CVE record · Linux
The Linux kernel’s btrfs qgroup code calculates an incorrect length when freeing reserved data. The input does not describe an attacker outcome or specify whether exploitation requires network access, local access, authentication, or user interaction.
Engineers running Linux kernel versions with the affected btrfs qgroup code should check their installations; affected versions are not specified.