CVE-2025-71122: iommufd/selftest: Check for overflow in IOMMU_TEST_OP_ADD_RESERVED
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iommufd/selftest: Check for overflow in IOMMU_TEST_OP_ADD_RESERVED
syzkaller found it could overflow math in the test infrastructure and cause a WARN_ON by corrupting the reserved interval tree. This only effects test kernels with CONFIG_IOMMUFD_TEST.
Validate the user input length in the test ioctl.
The Linux kernel CVE team has assigned CVE-2025-71122 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.2 with commit f4b20bb34c83dceade5470288f48f94ce3598ada and fixed in 6.6.120 with commit 4cc829d61f10c20523fd4085c1546e741a792a97 Issue introduced in 6.2 with commit f4b20bb34c83dceade5470288f48f94ce3598ada and fixed in 6.12.64 with commit e6c122cffcbb2e84d321ec8ba0e38ce8e7c10925 Issue introduced in 6.2 with commit f4b20bb34c83dceade5470288f48f94ce3598ada and fixed in 6.18.3 with commit b166b8e0a381429fefd9180e67fbc834b3cee82f Issue introduced in 6.2 with commit f4b20bb34c83dceade5470288f48f94ce3598ada and fixed in 6.19-rc2 with commit e6a973af11135439de32ece3b9cbe3bfc043bea8
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-71122
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/selftest.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/4cc829d61f10c20523fd4085c1546e741a792a97 https://git.kernel.org/stable/c/e6c122cffcbb2e84d321ec8ba0e38ce8e7c10925 https://git.kernel.org/stable/c/b166b8e0a381429fefd9180e67fbc834b3cee82f https://git.kernel.org/stable/c/e6a973af11135439de32ece3b9cbe3bfc043bea8