Skip to contentSkip to conversation

CVE-2025-71071: iommu/mediatek: fix use-after-free on probe deferral

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jan 13

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/mediatek: fix use-after-free on probe deferral

The driver is dropping the references taken to the larb devices during probe after successful lookup as well as on errors. This can potentially lead to a use-after-free in case a larb device has not yet been bound to its driver so that the iommu driver probe defers.

Fix this by keeping the references as expected while the iommu driver is bound.

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

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

	Issue introduced in 6.1.2 with commit 8412e5dd24ffc8bc21a00bfaa0b80d4596cdc9da and fixed in 6.1.160 with commit 896ec55da3b90bdb9fc04fedc17ad8c359b2eee5
	Issue introduced in 6.2 with commit 26593928564cf5b576ff05d3cbd958f57c9534bb and fixed in 6.6.120 with commit 5c04217d06a1161aaf36267e9d971ab6f847d5a7
	Issue introduced in 6.2 with commit 26593928564cf5b576ff05d3cbd958f57c9534bb and fixed in 6.12.64 with commit 1ef70a0b104ae8011811f60bcfaa55ff49385171
	Issue introduced in 6.2 with commit 26593928564cf5b576ff05d3cbd958f57c9534bb and fixed in 6.18.3 with commit f6c08d3aa441bbc1956e9d65f1cbb89113a5aa8a
	Issue introduced in 6.2 with commit 26593928564cf5b576ff05d3cbd958f57c9534bb and fixed in 6.19-rc1 with commit de83d4617f9fe059623e97acf7e1e10d209625b5
	Issue introduced in 6.0.16 with commit 51080de72e26771f0ed9d44982974279ccbc92b8

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

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/mtk_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/896ec55da3b90bdb9fc04fedc17ad8c359b2eee5
	https://git.kernel.org/stable/c/5c04217d06a1161aaf36267e9d971ab6f847d5a7
	https://git.kernel.org/stable/c/1ef70a0b104ae8011811f60bcfaa55ff49385171
	https://git.kernel.org/stable/c/f6c08d3aa441bbc1956e9d65f1cbb89113a5aa8a
	https://git.kernel.org/stable/c/de83d4617f9fe059623e97acf7e1e10d209625b5