CVE-2022-50810 in Linuxinfo

Summary

by MITRE • 12/30/2025

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

rapidio: devices: fix missing put_device in mport_cdev_open

When kfifo_alloc fails, the refcount of chdev->dev is left incremental. We should use put_device(&chdev->dev) to decrease the ref count of chdev->dev to avoid refcount leak.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 01/06/2026

This vulnerability exists within the Linux kernel's RapidIO subsystem, specifically in the device management code where improper reference counting leads to resource leaks. The issue manifests in the mport_cdev_open function which handles character device operations for RapidIO ports. When the kfifo_alloc function fails during device initialization, it leaves the device reference counter incremented without properly decrementing it. This represents a classic reference counting error that can lead to memory leaks and resource exhaustion over time.

The technical flaw stems from inadequate error handling in the device initialization path where the code fails to properly release references when allocation operations fail. The chdev->dev structure maintains a reference count that should be decremented upon failure to prevent resource leaks. This type of vulnerability falls under CWE-404, which specifically addresses improper resource release or cleanup, and more broadly relates to CWE-704, concerning incorrect use of APIs. The issue is particularly concerning in kernel space where resource leaks can accumulate and eventually lead to system instability or denial of service conditions.

The operational impact of this vulnerability extends beyond simple memory leaks to potentially compromise system stability and performance. In environments where RapidIO devices are heavily utilized, repeated failures during device open operations could cause progressive resource exhaustion, leading to system slowdowns or complete system hangs. The reference count leak occurs in a critical device management path, making it particularly dangerous as it can affect the entire RapidIO subsystem's ability to properly manage device resources. Attackers could potentially exploit this by repeatedly attempting to open RapidIO devices, causing gradual resource depletion that could lead to system unresponsiveness.

Mitigation strategies should focus on implementing proper error handling and reference counting practices in kernel code. The fix requires ensuring that put_device() is called on the chdev->dev structure whenever kfifo_alloc fails, thereby properly decrementing the reference count. System administrators should ensure their kernels are updated to versions containing this patch, as it represents a critical fix for kernel resource management. Additionally, monitoring for resource leaks in kernel space and implementing proper device management protocols can help detect similar issues before they escalate into system stability problems. This vulnerability highlights the importance of rigorous testing and code review practices in kernel development, particularly around resource management and error handling scenarios.

Responsible

Linux

Reservation

12/30/2025

Disclosure

12/30/2025

Moderation

accepted

CPE

ready

EPSS

0.00233

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!