Back

RDMA/rtrs-clt: Fix CQ pool leak when connect is interrupted

Published Oct 6, 2026

Description

The client borrows shared CQ credits in the ADDR_RESOLVED handler via ib_cq_pool_get(), before the peer is connected. create_cm() can return -ERESTARTSYS from wait_event_interruptible_timeout() without destroying the CM ID. The init_conns() and stop-and-destroy paths then call destroy_con_cq_qp() while cq is still NULL (no PUT) and only afterwards rdma_destroy_id().

CMA serializes the handler against rdma_destroy_id() with handler_mutex, but that does not order the GET against destroy_con_cq_qp(). If ADDR_RESOLVED has already passed the DESTROYING check, it can take con_mutex, GET credits, and then lose the con to kfree. Device unregister later hits WARN_ON(cq->cqe_used) in ib_cq_pool_cleanup().

Set a per-connection flag under con_mutex before CQ/QP teardown so a racing ADDR_RESOLVED cannot borrow credits after teardown has begun.

Affected products

Remediation

No remediation recorded yet.

Weaknesses (0)

No CWE recorded.

References (8)

Change history (0)

No recorded changes yet.

Sources

CVE.org / MITRE

Status PUBLISHED
Assigner Linux
Published Oct 6, 2026
Updated Oct 6, 2026
Reserved Sep 25, 2026

CISA Vulnrichment

No data

NVD

Status Received
Modified Oct 6, 2026

Red Hat

No data

ENISA EUVD

Assigner Linux
Published Oct 6, 2026
Updated Oct 6, 2026

GitHub

No data