В ядре Linux была устранена следующая уязвимость: RDMA/erdma: Fix CEQ tasklet use-after-free по удалению Each CEQ обработчик прерываний только расписания eqc->tasklet. Задание вызывает erdma_ceq_completion_handler(), который считывает DMA-когерентное кольцо EQ через get_next_valid_eqe() и обновляет eq->dbrec через notify_eq(). erdma_ceqs_uninit() освобождает каждый CEQ IRQ, а затем уничтожает его EQ. free_irq() предотвращает другой жесткий IRQ и ждет обработчика в полете. Таким образом, tasklet может получить доступ к eq->qbuf или eq->dbrec после того, как erdma_eq_destroy () освободит их.
Клиринг ceq_cb->ready не синхронизируется с набором задач, который уже прошел проверку в начале erdma_ceq_completion_handler(). Убейте tasklet после free_irq(), когда ни один обработчик не может запланировать его снова, и до того, как erdma_ceq_uninit_one() выпустит буферы EQ.
Показать оригинальное описание (EN)
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.