CVE-2026-64289: iommufd: Set upper bounds on cache invalidation entry_num and entry_len

Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:48:26 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072504-CVE-2026-64289-3802@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

iommufd: Set upper bounds on cache invalidation entry_num and entry_len

iommufd_hwpt_invalidate() takes a user-controlled entry_num and entry_len,
each bounded only by U32_MAX. An entry_len beyond the kernel's struct size
makes the copy helper verify the extra bytes are zero, scanning that excess
in one uninterruptible pass; a multi-gigabyte value over zeroed user memory
trips the soft-lockup watchdog.

A large entry_num is the other half, driving the backend invalidation loop
with no reschedule. The VT-d nested handler, for one, copies each entry and
flushes caches per iteration, pinning the CPU on a non-preemptible kernel.

Cap both in the ioctl. entry_len is held under PAGE_SIZE, above any request
struct, and entry_num under 1 << 19, the order of a hardware invalidation
queue and well beyond any real batch, bounding the per-call loop length.

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


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

	Issue introduced in 6.8 with commit 8c6eabae3807e048b9f17733af5e20500fbf858c and fixed in 6.12.96 with commit d2bd041e0efaf7d81789779b135279d18b33d6d5
	Issue introduced in 6.8 with commit 8c6eabae3807e048b9f17733af5e20500fbf858c and fixed in 6.18.39 with commit 32ca4aed2a66205b072fcfecabe220289a8149ff
	Issue introduced in 6.8 with commit 8c6eabae3807e048b9f17733af5e20500fbf858c and fixed in 7.1.4 with commit 2c6381d90898089287e0a358f06f89f6b4b389f2
	Issue introduced in 6.8 with commit 8c6eabae3807e048b9f17733af5e20500fbf858c and fixed in 7.2-rc1 with commit 4d70986002f2f3eaaed89124fb2522bded38b016

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-64289
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:
	drivers/iommu/iommufd/hw_pagetable.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/d2bd041e0efaf7d81789779b135279d18b33d6d5
	https://git.kernel.org/stable/c/32ca4aed2a66205b072fcfecabe220289a8149ff
	https://git.kernel.org/stable/c/2c6381d90898089287e0a358f06f89f6b4b389f2
	https://git.kernel.org/stable/c/4d70986002f2f3eaaed89124fb2522bded38b016