# CVE-2021-47378: nvme-rdma: destroy cm id before destroy qp to avoid use after free

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/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): 1.18%, higher than 68% of CVEs (2026-12-01)
- Published: 2024-05-21T15:03:41.038Z
- Modified: 2026-08-05T08:47:31.303Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: Linux

## Description

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

nvme-rdma: destroy cm id before destroy qp to avoid use after free

We should always destroy cm_id before destroy qp to avoid to get cma
event after qp was destroyed, which may lead to use after free.
In RDMA connection establishment error flow, don't destroy qp in cm
event handler.Just report cm_error to upper level, qp will be destroy
in nvme_rdma_alloc_queue() after destroy cm id.

(As written by CVE List.)

## Affected

- Linux Linux: from 7110230719602852481c2793d054f866b2bf4a2b before ecf0dc5a904830c926a64feffd8e01141f89822f; from 7110230719602852481c2793d054f866b2bf4a2b before d268a182c56e8361e19fb781137411643312b994; from 7110230719602852481c2793d054f866b2bf4a2b before 9817d763dbe15327b9b3ff4404fa6f27f927e744; 4.8 (not affected: before 4.8; from 5.10.70 up to 5.10.*; from 5.14.9 up to 5.14.*; from 5.15 up to *)
- linux linux_kernel: 1da177e4c3f4; before 5.10.70; from 5.11 before 5.14.9; 5.15 (not affected: 5.10.70; 5.14.9; 5.15)

## Every score

- Linux: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/ecf0dc5a904830c926a64feffd8e01141f89822f> (patch)
- <https://git.kernel.org/stable/c/d268a182c56e8361e19fb781137411643312b994> (patch)
- <https://git.kernel.org/stable/c/9817d763dbe15327b9b3ff4404fa6f27f927e744> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2021-47378 · Whole record: https://cve.day/CVE-2021-47378.json · Rebuilt by cve.day 2026-11-25T22:58:08.825Z
