Skip to contentSkip to conversation

CVE-2023-54290: thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 30, 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:

thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe

Smatch reports:
1. mtk_thermal_probe() warn: 'apmixed_base' from of_iomap() not released.
2. mtk_thermal_probe() warn: 'auxadc_base' from of_iomap() not released.

The original code forgets to release iomap resource when handling errors, fix it by switch to devm_of_iomap.

The Linux kernel CVE team has assigned CVE-2023-54290 to this issue.

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

	Issue introduced in 5.9 with commit 89945047b1666c021c4222ef285239c1275f8e24 and fixed in 5.10.180 with commit 15da2acad5156937c5b62444b18c6c20dd20f64d
	Issue introduced in 5.9 with commit 89945047b1666c021c4222ef285239c1275f8e24 and fixed in 5.15.111 with commit 388d2578c7d7165c1aeca76a0b5ae38e6d74b176
	Issue introduced in 5.9 with commit 89945047b1666c021c4222ef285239c1275f8e24 and fixed in 6.1.28 with commit b3b3f66bd47cb6fcee710bb24bdffbf5e7c727c2
	Issue introduced in 5.9 with commit 89945047b1666c021c4222ef285239c1275f8e24 and fixed in 6.2.15 with commit 67b5051ad1dfd9d72efca235f740d7e4a34183f0
	Issue introduced in 5.9 with commit 89945047b1666c021c4222ef285239c1275f8e24 and fixed in 6.3.2 with commit e83b320b9e914ddf51fdf2374034113b872a49d7
	Issue introduced in 5.9 with commit 89945047b1666c021c4222ef285239c1275f8e24 and fixed in 6.4 with commit f05c7b7d9ea9477fcc388476c6f4ade8c66d2d26

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-2023-54290

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/thermal/mediatek/auxadc_thermal.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/15da2acad5156937c5b62444b18c6c20dd20f64d
	https://git.kernel.org/stable/c/388d2578c7d7165c1aeca76a0b5ae38e6d74b176
	https://git.kernel.org/stable/c/b3b3f66bd47cb6fcee710bb24bdffbf5e7c727c2
	https://git.kernel.org/stable/c/67b5051ad1dfd9d72efca235f740d7e4a34183f0
	https://git.kernel.org/stable/c/e83b320b9e914ddf51fdf2374034113b872a49d7
	https://git.kernel.org/stable/c/f05c7b7d9ea9477fcc388476c6f4ade8c66d2d26