Skip to contentSkip to conversation

CVE-2025-37748: iommu/mediatek: Fix NULL pointer deference in mtk_iommu_device_group

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 1, 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/mediatek: Fix NULL pointer deference in mtk_iommu_device_group

Currently, mtk_iommu calls during probe iommu_device_register before the hw_list from driver data is initialized. Since iommu probing issue fix, it leads to NULL pointer dereference in mtk_iommu_device_group when hw_list is accessed with list_first_entry (not null safe).

So, change the call order to ensure iommu_device_register is called after the driver data are initialized.

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

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

	Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.1.135 with commit 2f75cb27bef43c8692b0f5e471e5632f6a9beb99
	Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.6.88 with commit 6abd09bed43b8d83d461e0fb5b9a200a06aa8a27
	Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.12.24 with commit a0842539e8ef9386c070156103aff888e558a60c
	Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.13.12 with commit ce7d3b2f6f393fa35f0ea12861b83a1ca28b295c
	Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.14.3 with commit 69f9d2d37d1207c5a73dac52a4ce1361ead707f5
	Issue introduced in 5.19 with commit 9e3a2a64365318a743e3c0b028952d2cdbaf2b0c and fixed in 6.15-rc2 with commit 38e8844005e6068f336a3ad45451a562a0040ca1

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

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/2f75cb27bef43c8692b0f5e471e5632f6a9beb99
	https://git.kernel.org/stable/c/6abd09bed43b8d83d461e0fb5b9a200a06aa8a27
	https://git.kernel.org/stable/c/a0842539e8ef9386c070156103aff888e558a60c
	https://git.kernel.org/stable/c/ce7d3b2f6f393fa35f0ea12861b83a1ca28b295c
	https://git.kernel.org/stable/c/69f9d2d37d1207c5a73dac52a4ce1361ead707f5
	https://git.kernel.org/stable/c/38e8844005e6068f336a3ad45451a562a0040ca1