# CVE-2022-50662: RDMA/hns: fix memory leak in hns_roce_alloc_mr()

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2025-12-09T01:29:10.614Z
- Modified: 2026-11-10T12:10:00.177Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 before 164fa80330a81db67c26d10d071083941d29a510; from 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 before 35f9cd060e68ff910e49bf37b1b0d336a311849a; from 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 before fd32e378bc1dea0d48767adf2bbb478581bb0a95; from 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 before fc2c43bf41c89e7451fe750025ae55eb2e2a741d; from 9b2cf76c9f052987ae5c4ad450ebebdc7c5d7b87 before a115aa00b18f7b8982b8f458149632caf64a862a; 5.8 (not affected: before 5.8; from 5.10.163 up to 5.10.*; from 5.15.86 up to 5.15.*; from 6.0.16 up to 6.0.*; from 6.1.2 up to 6.1.*; from 6.2 up to *)

## References

- <https://git.kernel.org/stable/c/164fa80330a81db67c26d10d071083941d29a510>
- <https://git.kernel.org/stable/c/35f9cd060e68ff910e49bf37b1b0d336a311849a>
- <https://git.kernel.org/stable/c/fd32e378bc1dea0d48767adf2bbb478581bb0a95>
- <https://git.kernel.org/stable/c/fc2c43bf41c89e7451fe750025ae55eb2e2a741d>
- <https://git.kernel.org/stable/c/a115aa00b18f7b8982b8f458149632caf64a862a>

## Sources

- CVE List: [CVE-2022-50662](https://www.cve.org/CVERecord?id=CVE-2022-50662), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-50662](https://nvd.nist.gov/vuln/detail/CVE-2022-50662), Public domain, modified 2026-11-10

---

Page: https://cve.day/CVE-2022-50662 · Whole record: https://cve.day/CVE-2022-50662.json · Rebuilt by cve.day 2026-11-25T22:58:21.311Z
