Skip to contentSkip to conversation

CVE-2025-37877: iommu: Clear iommu-dma ops on cleanup

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 9, 2025

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: Clear iommu-dma ops on cleanup

If iommu_device_register() encounters an error, it can end up tearing down already-configured groups and default domains, however this currently still leaves devices hooked up to iommu-dma (and even historically the behaviour in this area was at best inconsistent across architectures/drivers...) Although in the case that an IOMMU is present whose driver has failed to probe, users cannot necessarily expect DMA to work anyway, it's still arguable that we should do our best to put things back as if the IOMMU driver was never there at all, and certainly the potential for crashing in iommu-dma itself is undesirable. Make sure we clean up the dev->dma_iommu flag along with everything else.

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

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

	Fixed in 6.12.26 with commit b14d98641312d972bb3f38e82eddf92898522389
	Fixed in 6.14.5 with commit 104a84276821aed0ed241ce0d82d6c3267e3fcb8
	Fixed in 6.15-rc2 with commit 280e5a30100578106a4305ce0118e0aa9b866f12

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

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/iommu.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/b14d98641312d972bb3f38e82eddf92898522389
	https://git.kernel.org/stable/c/104a84276821aed0ed241ce0d82d6c3267e3fcb8
	https://git.kernel.org/stable/c/280e5a30100578106a4305ce0118e0aa9b866f12