CVE-2022-50311 in Linuxinfo

Summary

by MITRE • 09/15/2025

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

cxl: Fix refcount leak in cxl_calc_capp_routing

of_get_next_parent() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. This function only calls of_node_put() in normal path, missing it in the error path. Add missing of_node_put() to avoid refcount leak.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 01/10/2026

The vulnerability CVE-2022-50311 represents a reference count leak in the Linux kernel's Compute Express Link (CXL) subsystem, specifically within the cxl_calc_capp_routing function. This issue affects the kernel's handling of device tree node references during CXL device enumeration and configuration operations. The problem manifests when the of_get_next_parent() function is called, which increments the reference count of a device tree node pointer to ensure proper resource management. The kernel's implementation correctly releases this reference using of_node_put() in the normal execution path, but fails to perform this cleanup operation in error handling scenarios, creating a memory leak condition.

The technical flaw stems from improper resource management within the device tree traversal logic of the CXL driver. When of_get_next_parent() is invoked, it returns a pointer to a device tree node with an incremented reference count that must be explicitly released by the caller. The cxl_calc_capp_routing function properly implements of_node_put() cleanup in its standard execution flow, but neglects to include this release operation when error conditions occur during the routing calculation process. This oversight creates a scenario where device tree node references remain allocated indefinitely, causing gradual memory consumption that can eventually impact system stability and performance. The vulnerability directly relates to CWE-404, which addresses improper resource release or unbalanced resource management, and specifically targets the kernel's device tree subsystem management practices.

The operational impact of this reference count leak extends beyond simple memory consumption issues to potentially compromise system reliability in embedded and high-performance computing environments where CXL devices are prevalent. Systems utilizing CXL fabrics for high-speed interconnectivity between processors, memory, and accelerators may experience progressive resource degradation over time, particularly in long-running applications or servers handling multiple CXL device configurations. The leak becomes more pronounced in environments with frequent device tree traversals or repeated CXL routing calculations, as each error path execution accumulates additional unreleased references. This vulnerability could contribute to system instability, reduced available memory for other kernel subsystems, and potential denial of service conditions in resource-constrained environments where memory management is critical.

Mitigation strategies for CVE-2022-50311 focus on ensuring comprehensive reference count management across all execution paths within the affected kernel driver. The fix requires adding the missing of_node_put() call in error handling branches of the cxl_calc_capp_routing function to maintain balanced reference counting. System administrators should prioritize applying the kernel patch that resolves this issue, particularly in production environments where CXL devices are deployed. The vulnerability demonstrates the importance of rigorous testing for error paths in kernel code, as proper resource management must be maintained regardless of execution flow. Security teams should monitor kernel updates and ensure that systems utilizing CXL capabilities receive timely patches to prevent potential exploitation through resource exhaustion attacks. This issue aligns with ATT&CK technique T1499.001, which involves resource exhaustion attacks, where improper resource management can create conditions that facilitate such attacks by consuming system resources over time.

Responsible

Linux

Reservation

09/15/2025

Disclosure

09/15/2025

Moderation

accepted

CPE

ready

EPSS

0.00146

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!