CVE-2026-64281: svcrdma: wake sq waiters when the transport closes

Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:48:18 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072502-CVE-2026-64281-6855@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

svcrdma: wake sq waiters when the transport closes

Threads parked in svc_rdma_sq_wait() on sc_sq_ticket_wait or
sc_send_wait can hang indefinitely in TASK_UNINTERRUPTIBLE state
across transport teardown, pinning svc_xprt references and
blocking svc_rdma_free().

The close path sets XPT_CLOSE before invoking xpo_detach and both
wait_event predicates include an XPT_CLOSE term, but the
predicates are re-evaluated only on wakeup. sc_sq_ticket_wait has
no completion-driven wake path; it is advanced solely by the
chained ticket handoff inside svc_rdma_sq_wait() itself. Without
an explicit wake at close, parked threads never observe
XPT_CLOSE, hold their svc_xprt_get reference forever, and
svc_rdma_free() blocks on xpt_ref dropping to zero.

Two close entry points reach this transport. Local teardown runs
svc_rdma_detach() from svc_handle_xprt() -> svc_delete_xprt() ->
xpo_detach() on a worker thread. A remote disconnect arrives at
svc_rdma_cma_handler(), which calls svc_xprt_deferred_close():
that sets XPT_CLOSE and enqueues the transport but does not
access either RDMA waitqueue, so a worker already parked in
svc_rdma_sq_wait() never re-evaluates its predicate. With every
worker parked on this transport, no thread is available to run
the local teardown either, and the wake site there is
unreachable.

Introduce svc_rdma_xprt_deferred_close(), a thin svcrdma wrapper
that calls svc_xprt_deferred_close() and then wakes both
sc_sq_ticket_wait and sc_send_wait. Convert the svcrdma producers
that called svc_xprt_deferred_close() directly:
svc_rdma_cma_handler(), qp_event_handler(),
svc_rdma_post_send_err(), svc_rdma_wc_send(), the sendto drop
path, the rw completion error paths, and the recvfrom flush and
read-list error paths.

Wake both waitqueues from svc_rdma_detach() as well. The
synchronous svc_xprt_close() path (backchannel ENOTCONN, device
removal via svc_rdma_xprt_done) reaches detach without flowing
through svc_xprt_deferred_close() and therefore does not invoke
the new helper.

[ cel: add svc_rdma_xprt_deferred_close() to complete the fix ]

The Linux kernel CVE team has assigned CVE-2026-64281 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 7.1 with commit ccc89b9d1ed233349cfe8d87b842e7351b74d8de and fixed in 7.1.4 with commit 40eedc4253dbda0b29b7961200534dfcecb48ace
	Issue introduced in 7.1 with commit ccc89b9d1ed233349cfe8d87b842e7351b74d8de and fixed in 7.2-rc1 with commit e5248a7426030db1e126363f72afdb3b71339a5c

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-64281
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	include/linux/sunrpc/svc_rdma.h
	net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
	net/sunrpc/xprtrdma/svc_rdma_rw.c
	net/sunrpc/xprtrdma/svc_rdma_sendto.c
	net/sunrpc/xprtrdma/svc_rdma_transport.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/40eedc4253dbda0b29b7961200534dfcecb48ace
	https://git.kernel.org/stable/c/e5248a7426030db1e126363f72afdb3b71339a5c