RDMA/erdma: Fix CEQ tasklet use-after-free on removal
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f2a0a630b953451a59a2612ad8c29246638f0a38 · < 0ca79979384f031d710c4b3bae065dcb5d95aca3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/erdma: Fix CEQ tasklet use-after-free on removal
Each CEQ interrupt handler only schedules eqc->tasklet. The tasklet calls erdma_ceq_completion_handler(), which reads the DMA-coherent EQ ring through get_next_valid_eqe() and updates eq->dbrec through notify_eq().
erdma_ceqs_uninit() frees each CEQ IRQ and then destroys its EQ. free_irq() prevents another hard IRQ and waits for an in-flight handler, but it does not drain a tasklet that the handler already scheduled. The tasklet can therefore access eq->qbuf or eq->dbrec after erdma_eq_destroy() frees them.
Clearing ceq_cb->ready does not synchronize with a tasklet that already passed the check at the start of erdma_ceq_completion_handler().
Kill the tasklet after free_irq(), when no handler can schedule it again, and before erdma_ceq_uninit_one() releases the EQ buffers.
From the CVE record · Linux
The Linux kernel’s RDMA/erdma driver can access freed EQ buffers if a CEQ tasklet remains scheduled during device removal. The input does not establish how an attacker could trigger this condition or whether authentication or user interaction is required.
Engineers running Linux kernels with the RDMA/erdma driver should check whether their kernel includes the fix; affected versions are not specified.