Skip to contentSkip to conversation

CVE-2026-23067: iommu/io-pgtable-arm: fix size_t signedness bug in unmap path

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 4

lore
Share & tools
lore
#0 lore raw

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

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

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

iommu/io-pgtable-arm: fix size_t signedness bug in unmap path

__arm_lpae_unmap() returns size_t but was returning -ENOENT (negative error code) when encountering an unmapped PTE. Since size_t is unsigned, -ENOENT (typically -2) becomes a huge positive value (0xFFFFFFFFFFFFFFFE on 64-bit systems).

This corrupted value propagates through the call chain:
__arm_lpae_unmap() returns -ENOENT as size_t -> arm_lpae_unmap_pages() returns it
-> __iommu_unmap() adds it to iova address
-> iommu_pgsize() triggers BUG_ON due to corrupted iova

This can cause IOVA address overflow in __iommu_unmap() loop and trigger BUG_ON in iommu_pgsize() from invalid address alignment.

Fix by returning 0 instead of -ENOENT. The WARN_ON already signals the error condition, and returning 0 (meaning "nothing unmapped") is the correct semantic for size_t return type. This matches the behavior of other io-pgtable implementations (io-pgtable-arm-v7s, io-pgtable-dart) which return 0 on error conditions.

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

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

	Issue introduced in 6.16 with commit 3318f7b5cefbff96b1bb49584ac38d2c9997a830 and fixed in 6.18.8 with commit 41ec6988547819756fb65e94fc24f3e0dddf84ac
	Issue introduced in 6.16 with commit 3318f7b5cefbff96b1bb49584ac38d2c9997a830 and fixed in 6.19-rc7 with commit 374e7af67d9d9d6103c2cfc8eb32abfecf3a2fd8

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-23067

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/io-pgtable-arm.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/41ec6988547819756fb65e94fc24f3e0dddf84ac
	https://git.kernel.org/stable/c/374e7af67d9d9d6103c2cfc8eb32abfecf3a2fd8