Skip to contentSkip to conversation

CVE-2022-49454: PCI: mediatek: Fix refcount leak in mtk_pcie_subsys_powerup()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

PCI: mediatek: Fix refcount leak in mtk_pcie_subsys_powerup()

The of_find_compatible_node() function returns a node pointer with refcount incremented, We should use of_node_put() on it when done Add the missing of_node_put() to release the refcount.

The Linux kernel CVE team has assigned CVE-2022-49454 to this issue.

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

	Issue introduced in 5.15 with commit 87e8657ba99cac87b84c7f8ead91b44d88345504 and fixed in 5.15.46 with commit ad1c9d13e04509ae24fae8dd2897148657323519
	Issue introduced in 5.15 with commit 87e8657ba99cac87b84c7f8ead91b44d88345504 and fixed in 5.17.14 with commit 4cef4237d6c37257cb6ddc397723e9c0dded0efe
	Issue introduced in 5.15 with commit 87e8657ba99cac87b84c7f8ead91b44d88345504 and fixed in 5.18.3 with commit 09b2d906d78ddf5042b1f3e0091835fc6997e8a4
	Issue introduced in 5.15 with commit 87e8657ba99cac87b84c7f8ead91b44d88345504 and fixed in 5.19 with commit 214e0d8fe4a813ae6ffd62bc2dfe7544c20914f4

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-2022-49454

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/pci/controller/pcie-mediatek.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/ad1c9d13e04509ae24fae8dd2897148657323519
	https://git.kernel.org/stable/c/4cef4237d6c37257cb6ddc397723e9c0dded0efe
	https://git.kernel.org/stable/c/09b2d906d78ddf5042b1f3e0091835fc6997e8a4
	https://git.kernel.org/stable/c/214e0d8fe4a813ae6ffd62bc2dfe7544c20914f4