CVE-2022-49454 in Linuxinfo

Summary

by MITRE • 02/26/2025

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.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 02/26/2025

The vulnerability identified as CVE-2022-49454 represents a memory management issue within the Linux kernel's PCI subsystem, specifically affecting the Mediatek PCIe driver implementation. This flaw resides in the mtk_pcie_subsys_powerup() function where improper reference counting handling leads to resource leakage. The issue manifests when the of_find_compatible_node() API is invoked to locate device tree nodes matching specific compatible strings, which inherently increments the reference count of the returned node pointer. The kernel's device tree subsystem follows strict reference counting semantics where each call to functions that return node pointers must be balanced with corresponding release operations to prevent memory leaks and resource exhaustion.

The technical root cause of this vulnerability stems from the violation of standard kernel memory management practices and directly correlates to CWE-404, which addresses improper resource release or unbalanced resource management. When of_find_compatible_node() locates a matching device tree node, it returns a reference to that node with its internal reference count incremented, indicating that the caller has acquired a reference to the node. However, the absence of the corresponding of_node_put() call means that this reference count never gets decremented, resulting in a persistent reference to the node that prevents proper memory cleanup. This pattern creates a memory leak where device tree nodes remain allocated in memory even after they are no longer needed by the PCIe subsystem, leading to progressive resource consumption over time.

The operational impact of this vulnerability extends beyond simple memory consumption issues and can significantly affect system stability and performance, particularly in embedded systems or devices with limited memory resources. The reference count leak accumulates over time as the PCIe subsystem performs power management operations, potentially leading to system memory exhaustion and subsequent denial of service conditions. This vulnerability is particularly concerning in automotive, industrial, and mobile device applications where the Mediatek PCIe driver is commonly deployed, as these environments often operate under strict resource constraints and require predictable system behavior. The leak may also contribute to increased system latency and reduced overall system responsiveness, as the kernel's memory management subsystem becomes less efficient due to the accumulation of unreleased references.

Mitigation strategies for this vulnerability require immediate patch application to address the missing of_node_put() call in the mtk_pcie_subsys_powerup() function, ensuring that every reference acquired through of_find_compatible_node() is properly released. System administrators should prioritize applying kernel updates that include this fix, particularly in production environments where the Mediatek PCIe driver is actively utilized. The vulnerability demonstrates the importance of adhering to kernel development best practices and proper reference counting protocols, which aligns with ATT&CK technique T1059.001 for kernel-level privilege escalation risks and T1490 for resource exhaustion attacks. Additional monitoring should focus on memory usage patterns and device tree node reference counts to detect potential exploitation or accumulation of similar issues in other kernel subsystems. The fix serves as a reminder of the critical nature of proper resource management in kernel space, where even seemingly minor reference counting errors can lead to significant system stability issues and potential security implications through resource exhaustion attacks.

Responsible

Linux

Reservation

02/26/2025

Disclosure

02/26/2025

Moderation

accepted

CPE

ready

EPSS

0.00240

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!