# CVE-2023-54201: RDMA/efa: Fix wrong resources deallocation order

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/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): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2025-12-30T12:09:06.211Z
- Modified: 2026-10-28T19:10:00.193Z
- Assigned by: Linux

## Description

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

RDMA/efa: Fix wrong resources deallocation order

When trying to destroy QP or CQ, we first decrease the refcount and
potentially free memory regions allocated for the object and then
request the device to destroy the object. If the device fails, the
object isn't fully destroyed so the user/IB core can try to destroy the
object again which will lead to underflow when trying to decrease an
already zeroed refcount.

Deallocate resources in reverse order of allocating them to safely free
them.

(As written by CVE List.)

## Affected

- Linux Linux: from ff6629f88c529b07d9704c656c64dae76910e3e9 before cf38960386f3cc4abf395e556af915e4babcafd2; from ff6629f88c529b07d9704c656c64dae76910e3e9 before e79db2f51a564fd4daa3e508b987df5e81c34b20; from ff6629f88c529b07d9704c656c64dae76910e3e9 before 24f9884971f9b34915b67baacf7350a3f6f19ea4; from ff6629f88c529b07d9704c656c64dae76910e3e9 before dc202c57e9a1423aed528e4b8dc949509cd32191; 5.7 (not affected: before 5.7; from 6.1.53 up to 6.1.*; from 6.4.16 up to 6.4.*; from 6.5.3 up to 6.5.*; from 6.6 up to *)

## References

- <https://git.kernel.org/stable/c/cf38960386f3cc4abf395e556af915e4babcafd2>
- <https://git.kernel.org/stable/c/e79db2f51a564fd4daa3e508b987df5e81c34b20>
- <https://git.kernel.org/stable/c/24f9884971f9b34915b67baacf7350a3f6f19ea4>
- <https://git.kernel.org/stable/c/dc202c57e9a1423aed528e4b8dc949509cd32191>

## Sources

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

---

Page: https://cve.day/CVE-2023-54201 · Whole record: https://cve.day/CVE-2023-54201.json · Rebuilt by cve.day 2026-11-25T22:58:35.218Z
