CVE-2026-139449: RDMA/rtrs-clt: Fix recv repost to satisfy ib_drain_rq
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rtrs-clt: Fix recv repost to satisfy ibdrainrq
On disconnect the client error recovery path calls ibdrainqp(), which requires one free RQ slot and that no recv WQEs are posted while the queue is being drained.
When the server is loaded with alwaysinvalidate=N, the path does not advertise RTRSMSGNEWRKEYF. A client-requested invalidation is then a standalone SENDWITHINV. The recv completion path did not repost that WQE; it posted two empty recv WQEs later, when the RDMA-with-IMM response carried RTRSIORSPWINVIMM. If the invalidate receive never arrived, each such response increased RQ occupancy by one until ibpostrecv() started returning -ENOMEM and ibdrainrq() failed with:
failed to drain recv queue: -12
Repost one empty recv WQE for every receive completion, including SENDWITHINV completions on the alwaysinvalidate=N path, and only while the path is still connected so CQ polling cannot race with ibdrainqp(). Size IO connection RQs to 2 queuedepth + 1 to match the posted recv count and leave the drain slot.
Tested with a synthetic RTRS client flooding unpaired RTRSIORSPWINVIMM messages; error recovery no longer triggers ibdrainrq() warnings.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the RTRS client receive-completion path, repost one empty receive WQE for every completion, including SEND_WITH_INV completions when always_invalidate=N.
- Compensating control
Size IO connection receive queues to 2 * queue_depth + 1 to leave the required slot for draining.