CVE-2022-50662
Description
In the Linux kernel, the following vulnerability has been resolved:
RDMA/hns: fix memory leak in hns_roce_alloc_mr()
When hns_roce_mr_enable() failed in hns_roce_alloc_mr(), mr_key is not released. Compiled test only.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in the Linux kernel's RDMA/hns driver occurs when hns_roce_mr_enable() fails, leaving mr_key unreleased.
Vulnerability
In the Linux kernel's RDMA/hns driver, the function hns_roce_alloc_mr() allocates a memory region (MR) and its associated key (mr_key). If the key is stored in a structure that must be released upon failure. However, if hns_roce_mr_enable() fails, the code path does not free the previously allocated mr_key, leading to a memory leak [1].
Exploitation
This vulnerability is triggered during memory region allocation when the enable step fails. An attacker with local access and the ability to trigger RDMA operations could cause repeated allocation failures, gradually exhausting kernel memory. No special privileges beyond those needed for RDMA usage are required, but the attack surface is limited to systems using the Hisilicon (hns) RDMA hardware.
Impact
A local attacker can cause a denial-of-service (DoS) by exhausting kernel memory through repeated failed allocations, potentially leading to system instability or crash. The leak is small per occurrence but can accumulate over time.
Mitigation
The fix was applied to the Linux kernel stable tree in commit a115aa00b18f [2]. Users should update to a kernel version containing this commit or a backport. No workaround is available other than applying the patch.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
5164fa80330a835f9cd060e68fd32e378bc1dfc2c43bf41c8a115aa00b18fVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/164fa80330a81db67c26d10d071083941d29a510nvd
- git.kernel.org/stable/c/35f9cd060e68ff910e49bf37b1b0d336a311849anvd
- git.kernel.org/stable/c/a115aa00b18f7b8982b8f458149632caf64a862anvd
- git.kernel.org/stable/c/fc2c43bf41c89e7451fe750025ae55eb2e2a741dnvd
- git.kernel.org/stable/c/fd32e378bc1dea0d48767adf2bbb478581bb0a95nvd
News mentions
0No linked articles in our index yet.