CVE-2022-50874 in Linux
Summary
by MITRE • 12/30/2025
In the Linux kernel, the following vulnerability has been resolved:
RDMA/erdma: Fix refcount leak in erdma_mmap
rdma_user_mmap_entry_get() take reference, we should release it when not need anymore, add the missing rdma_user_mmap_entry_put() in the error path to fix it.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 04/26/2026
The vulnerability identified as CVE-2022-50874 resides within the Linux kernel's RDMA/erdma subsystem, specifically addressing a reference count leak in the erdma_mmap function. This issue affects the erdma driver which is part of the Linux kernel's RDMA (Remote Direct Memory Access) framework designed to enable high-performance network communication between systems. The problem manifests when the rdma_user_mmap_entry_get() function is called to acquire a reference to a memory mapping entry, but the corresponding release operation is not properly executed during error handling paths. This represents a classic memory management flaw that can lead to resource exhaustion and system instability.
The technical flaw stems from improper reference counting management within the kernel's memory mapping subsystem. When rdma_user_mmap_entry_get() is invoked to obtain a reference to a memory mapping entry, it increments the reference count to ensure the entry remains valid during use. However, in error conditions or early exit paths of the erdma_mmap function, the developers failed to include the corresponding rdma_user_mmap_entry_put() call to decrement the reference count. This oversight creates a situation where references accumulate without being released, leading to a memory leak that can progressively consume system resources over time. The vulnerability is classified under CWE-404 as an improper resource management issue, specifically involving reference counting errors.
The operational impact of this vulnerability extends beyond simple memory consumption, potentially affecting system stability and performance in environments utilizing RDMA capabilities. When reference count leaks accumulate, they can cause memory fragmentation and eventually lead to resource exhaustion that may prevent new memory mappings from being established. This can result in application failures, system slowdowns, or in severe cases, system crashes or denial of service conditions. The vulnerability is particularly concerning in high-performance computing environments where RDMA is extensively used for data center networking and storage operations. Attackers could potentially exploit this flaw to cause persistent resource exhaustion, making it a significant concern for systems handling critical workloads.
Mitigation strategies for CVE-2022-50874 involve applying the official kernel patch that correctly implements the missing rdma_user_mmap_entry_put() call in all error handling paths of the erdma_mmap function. System administrators should prioritize updating their Linux kernel versions to include this fix, particularly in production environments where RDMA functionality is utilized. The patch ensures proper reference counting behavior by guaranteeing that every acquired reference through rdma_user_mmap_entry_get() is appropriately released through rdma_user_mmap_entry_put(), maintaining the integrity of the kernel's memory management subsystem. Organizations should also implement monitoring for unusual memory consumption patterns that could indicate resource leak issues, and consider implementing automated patch management processes to ensure timely deployment of security fixes. This vulnerability aligns with ATT&CK technique T1499.001 for resource exhaustion attacks, where adversaries may leverage memory leaks to cause system instability or denial of service conditions.