RDMA/erdma: Hold CQ references when processing EQ events
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 155055771704f8cbb5c176a4309b7dc30a50450c · < 98df2aee1459ee1c62c70cbe9b370d2a532aea36| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/erdma: Hold CQ references when processing EQ events
EQ handlers look up CQs from dev->cq_xa and invoke CQ completion or error callbacks outside the xarray lock. erdma_destroy_cq() can erase the CQ from the xarray and free its queue buffer and doorbell record while a previously scheduled EQ handler is still using the CQ.
Add a CQ refcount and take a reference under the xarray lock with refcount_inc_not_zero(). Remove the CQ from the xarray before dropping the destroy-path reference, then wait for in-flight EQ users before releasing CQ resources.
From the CVE record · Linux
In the Linux kernel’s RDMA/erdma driver, an event handler can continue using a completion queue after another path destroys it and frees its resources. This can occur when event processing overlaps with completion-queue destruction; the input does not specify attacker access requirements, user interaction, or a resulting exploit.
Engineers running Linux kernels with the RDMA/erdma driver should check their versions; affected versions are not specified.