CVE-2026-143156: xprtrdma: serialize unmap_sync with xprt_disconnect
In the Linux kernel, the following vulnerability has been resolved:
xprtrdma: serialize unmapsync with xprtdisconnect
frwrunmapsync() posts LOCALINV Work Requests to the QP and waits for the matching CQE. This can race with rpcrdmaxprtdisconnect():
1. frwrunmapsync() samples rxprt->rxep 2. rpcrdmaxprtdisconnect() drains the QP 3. frwrunmapsync() posts LOCALINV WRs after the drain 4. No CQE arrives, so waitforcompletion() blocks indefinitely
The hung task appears in the rpciod workqueue:
Workqueue: rpciod rpcasyncschedule [sunrpc] waitforcompletion() frwrunmapsync() xprtrdmafree() xprtrelease()
Serialize synchronous MR invalidation against QP teardown with rxunmaprwsem. frwrunmapsync() holds the read side while it builds and submits the LOCALINV chain. Disconnect holds the write side across QP drain and resource teardown. Drop the read side before waiting so disconnect can drain the submitted Work Requests and deliver their CQEs.
Disconnect can reset a request while frwrunmapsync() waits for the read side. Recheck rlregistered after acquiring the rwsem and return without posting if the request has already been reset.
Move the synchronous invalidation completion from the final MR to the request, whose lifetime covers xprtrdmafree(). This allows disconnect to destroy MRs after draining the QP while frwrunmapsync() is still waiting. On a post failure, call rpcrdmaforcedisconnect() before dropping the read side so the endpoint is not dereferenced after disconnect can run.
frwrunmapasync() runs inline from Receive completion processing. rpcrdmaxprtdrain() drains the Receive Queue before the Send Queue, so asynchronous LOCALINV Work Requests are submitted before Send Queue drain. frwrunmapsync(), however, runs from xprtrdmafree() after the transport send lock has been released, so it is not ordered against disconnect.
Tested on v7.4-rc1 under pNFS load with repeated data server restarts to provoke rapid QP disconnect/reconnect cycling. Without the fix, a hung task in frwrunmapsync() reproduced twice in six attempts. With the fix, no hang occurred across 200 cycles.
Also observed on v6.8 and v6.18.34.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In xprtrdma, serialize synchronous MR invalidation against QP teardown with rx_unmap_rwsem; recheck rl_registered after acquiring the rwsem and return without posting if the request has been reset; drop the read side before waiting for completion; and move synchronous invalidation completion from the final MR to the request, whose lifetime covers xprt_rdma_free().
Event History
Frequently Asked Questions
What systems are exposed to this hang?
Systems using the Linux kernel's xprtrdma/RDMA RPC transport can encounter the issue when synchronous memory-region invalidation overlaps with transport disconnect and QP teardown.
How can I recognize that the issue has occurred?
A task can block indefinitely in the rpciod workqueue. The reported call path includes wait_for_completion(), frwr_unmap_sync(), xprt_rdma_free(), and xprt_release().
What does the resolved change do?
It serializes synchronous memory-region invalidation with disconnect using rx_unmap_rwsem, preventing LOCAL_INV work requests from being posted after the QP has been drained. It also rechecks whether a request was reset before posting invalidation work.