Skip to contentSkip to conversation

CVE-2025-71268: btrfs: fix reservation leak in some error paths when inserting inline extent

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 18

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: fix reservation leak in some error paths when inserting inline extent

If we fail to allocate a path or join a transaction, we return from __cow_file_range_inline() without freeing the reserved qgroup data, resulting in a leak. Fix this by ensuring we call btrfs_qgroup_free_data() in such cases.

The Linux kernel CVE team has assigned CVE-2025-71268 to this issue.

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

	Fixed in 6.1.163 with commit f7156512c8166d385f574b9ec030479aa7b1e8c9
	Fixed in 6.6.124 with commit 28b97fcbbf523779688e8de5fe55bf2dae3859f6
	Fixed in 6.12.70 with commit f3ee1732851aec6fe6b2cec2ef1b32d4e71d9913
	Fixed in 6.18.10 with commit 28768bd3abf9995a93f6e01bfce01c60622964dd
	Fixed in 6.19 with commit c1c050f92d8f6aac4e17f7f2230160794fceef0c

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-2025-71268

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/inode.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/f7156512c8166d385f574b9ec030479aa7b1e8c9
	https://git.kernel.org/stable/c/28b97fcbbf523779688e8de5fe55bf2dae3859f6
	https://git.kernel.org/stable/c/f3ee1732851aec6fe6b2cec2ef1b32d4e71d9913
	https://git.kernel.org/stable/c/28768bd3abf9995a93f6e01bfce01c60622964dd
	https://git.kernel.org/stable/c/c1c050f92d8f6aac4e17f7f2230160794fceef0c