RDMA/core: Fix potential use after free in ib_free_cq()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 43d781b9fa562f0c6e50f62c870fbfeb9dc85213 · < 43403fe45379c64fa6276e5a8ede44493e5d2d3d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/core: Fix potential use after free in ib_free_cq()
When accessing a CQ via the netlink path the only synchronization mechanism for the said CQ is rdma_restrack_get(). Currently, rdma_restrack_del() is invoked at the end of ib_free_cq(), which is too late, since by that point vendor-specific resources associated with the CQ might already be freed. This can leave a short window where the CQ remains accessible through restrack, leading to a potential use-after-free.
Fix this by moving the rdma_restrack_del() call to be before the freeing of the vendor-specific resources ensuring that the CQ is removed from restrack before its internal resources are released. This guarantees that no new users hold references to a CQ that is in the process of destruction.
From the CVE record · Linux
The Linux kernel's RDMA completion queue cleanup can leave a queue accessible through the netlink path after vendor-specific resources have been freed. Someone able to access the queue through that path during its destruction could trigger a use-after-free. The input does not specify authentication requirements or further impact.
Engineers running Linux kernels with RDMA support should check their versions; affected versions are not specified.