CVE-2026-64357: xfs: fix exchmaps reservation limit check

Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:49:34 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072519-CVE-2026-64357-8c69@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

In the Linux kernel, the following vulnerability has been resolved:

xfs: fix exchmaps reservation limit check

xfs_exchmaps_estimate_overhead() adds the bmbt and rmapbt
overhead to a local resblks variable, but the final UINT_MAX
check still tests req->resblks.  That is the reservation value
from before the overhead was added.

The computed value is stored back in req->resblks and later passed
to xfs_trans_alloc(), whose block reservation argument is unsigned
int.  Check the computed reservation so the existing limit applies
to the value that will be used.

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


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

	Issue introduced in 6.10 with commit 966ceafc7a437105ecfe1cadb3747b2965a260ca and fixed in 6.12.96 with commit c597c8580d50127fc1221b5a5b653a94d49e23e3
	Issue introduced in 6.10 with commit 966ceafc7a437105ecfe1cadb3747b2965a260ca and fixed in 6.18.39 with commit a62ef2d13d6e7270dd5e88c6082bf2d0edcd5112
	Issue introduced in 6.10 with commit 966ceafc7a437105ecfe1cadb3747b2965a260ca and fixed in 7.1.4 with commit 4707344b0d36d1012c8a1716e20167cd3afdd5f1
	Issue introduced in 6.10 with commit 966ceafc7a437105ecfe1cadb3747b2965a260ca and fixed in 7.2-rc1 with commit 0a5213bbff62b51c7d4999ac8c7e11ea57d00d45

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-64357
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/xfs/libxfs/xfs_exchmaps.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/c597c8580d50127fc1221b5a5b653a94d49e23e3
	https://git.kernel.org/stable/c/a62ef2d13d6e7270dd5e88c6082bf2d0edcd5112
	https://git.kernel.org/stable/c/4707344b0d36d1012c8a1716e20167cd3afdd5f1
	https://git.kernel.org/stable/c/0a5213bbff62b51c7d4999ac8c7e11ea57d00d45