# CVE-2022-49930: RDMA/hns: Fix NULL pointer problem in free_mr_init()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- 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.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-05-01T14:11:07.408Z
- Modified: 2026-06-17T05:19:33.617Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

RDMA/hns: Fix NULL pointer problem in free_mr_init()

Lock grab occurs in a concurrent scenario, resulting in stepping on a NULL
pointer.  It should be init mutex_init() first before use the lock.

  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
  Call trace:
   __mutex_lock.constprop.0+0xd0/0x5c0
   __mutex_lock_slowpath+0x1c/0x2c
   mutex_lock+0x44/0x50
   free_mr_send_cmd_to_hw+0x7c/0x1c0 [hns_roce_hw_v2]
   hns_roce_v2_dereg_mr+0x30/0x40 [hns_roce_hw_v2]
   hns_roce_dereg_mr+0x4c/0x130 [hns_roce_hw_v2]
   ib_dereg_mr_user+0x54/0x124
   uverbs_free_mr+0x24/0x30
   destroy_hw_idr_uobject+0x38/0x74
   uverbs_destroy_uobject+0x48/0x1c4
   uobj_destroy+0x74/0xcc
   ib_uverbs_cmd_verbs+0x368/0xbb0
   ib_uverbs_ioctl+0xec/0x1a4
   __arm64_sys_ioctl+0xb4/0x100
   invoke_syscall+0x50/0x120
   el0_svc_common.constprop.0+0x58/0x190
   do_el0_svc+0x30/0x90
   el0_svc+0x2c/0xb4
   el0t_64_sync_handler+0x1a4/0x1b0
   el0t_64_sync+0x19c/0x1a0

(As written by CVE List.)

## Affected

- Linux Linux: from 70f92521584f1d1e8268311ee84413307b0fdea8 before 0e23e85d86b78e734dd6654f1b69fbaeb5534c81; from 70f92521584f1d1e8268311ee84413307b0fdea8 before 12bcaf87d8b66d8cd812479c8a6349dcb245375c; 5.18 (not affected: before 5.18; from 6.0.8 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 5.18 before 6.0.8; 6.1

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/0e23e85d86b78e734dd6654f1b69fbaeb5534c81> (patch)
- <https://git.kernel.org/stable/c/12bcaf87d8b66d8cd812479c8a6349dcb245375c> (patch)

## Sources

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

---

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