CVE-2021-47378: nvme-rdma: destroy cm id before destroy qp to avoid use after free
In the Linux kernel, the following vulnerability has been resolved:
nvme-rdma: destroy cm id before destroy qp to avoid use after free
The Linux kernel CVE team has assigned CVE-2021-47378 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024052142-CVE-2021-47378-8e72@gregkh/T
Other sources
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 cmid 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 cmerror to upper level, qp will be destroy in nvmerdmaallocqueue() after destroy cm id.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.10.70 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.14.9 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.15 - Upgrade
Upgrade
linux kernelto a version that resolves this vulnerability.Patch CVE-2021-47378 - Configuration
In RDMA connection establishment error flow, ensure nvme-rdma destroys cm_id before destroying qp ("destroy cm id before destroy qp") to avoid use-after-free during event handling.
nvme-rdma Connection establishment error flow cleanup order = destroy cm_id before destroy qp
Event History
Frequently Asked Questions
What is the severity of CVE-2021-47378?
CVE-2021-47378 is classified as a medium-severity vulnerability in the Linux kernel.
How do I fix CVE-2021-47378?
To fix CVE-2021-47378, update your kernel to version 5.10.70, 5.14.9, or 5.15 as specified by the vendor.
What systems are affected by CVE-2021-47378?
CVE-2021-47378 affects systems running specific versions of the Linux kernel before the specified remedied versions.
What does CVE-2021-47378 exploit?
CVE-2021-47378 exploits a use-after-free vulnerability in nvme-rdma functionality within the Linux kernel.
Is CVE-2021-47378 being actively exploited?
As of the latest reports, there is no indication that CVE-2021-47378 is being actively exploited in the wild.