Skip to contentSkip to conversation

CVE-2026-90259: btrfs: qgroup: fix a wrong length calculation in qgroup_free_reserved_data()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-90259 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.13 with commit bc42bda22345efdb5d8b578d1b4df2c6eaa85c58 and fixed in 6.18.52 with commit e6edde29990af8064b9d12217ec03db231ccd55d
	Issue introduced in 4.13 with commit bc42bda22345efdb5d8b578d1b4df2c6eaa85c58 and fixed in 7.2.6 with commit c4c136555ff90f1e2921cc42da43daac0ef9985e
	Issue introduced in 4.13 with commit bc42bda22345efdb5d8b578d1b4df2c6eaa85c58 and fixed in 7.3-rc1 with commit 9102b179512e11644fb0489ae62010a09afa199c

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-90259

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/btrfs/qgroup.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/e6edde29990af8064b9d12217ec03db231ccd55d
	https://git.kernel.org/stable/c/c4c136555ff90f1e2921cc42da43daac0ef9985e
	https://git.kernel.org/stable/c/9102b179512e11644fb0489ae62010a09afa199c