CVE-2026-99564: smb: smbdirect: don't wait for RDMA_CM_EVENT_DISCONNECTED in smbdirect_socket_destroy_sync()
In the Linux kernel, the following vulnerability has been resolved:
smb: smbdirect: don't wait for RDMACMEVENTDISCONNECTED in smbdirectsocketdestroysync()
smbdirectsocketdestroysync() waited for RDMACMEVENTDISCONNECTED after smbdirectsocketcleanupwork() called rdmadisconnect(). That can take very long, e.g. if the peer just disappeared, until the rdma cm gives up, or forever if the event already happened, but the status was overwritten afterwards.
This is not needed: smbdirectsocketdestroy() drains the qp under rdmalockhandler(), destroys it and calls rdmadestroyid(), which only waits for a currently running event handler and makes sure no further events are delivered. The rest of the disconnect protocol (DREQ/DREP and timewait for IB, abrupt close for iWarp) is handled by the rdma core asynchronously. drivers/nvme/host/rdma.c also just calls rdmadisconnect() and ibdrainqp() before rdmadestroyid().
So smbdirectsocketdestroy() now also accepts SMBDIRECTSOCKETDISCONNECTING and changes the status to SMBDIRECTSOCKETDISCONNECTED itself under rdmalockhandler().
We could still get RDMACMEVENTDISCONNECTED in the small windows between rdmaunlockhandler() and rdmadestroyid(), but in that case smbdirectconnectionrdmaeventhandler() is basically a no-op.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.15 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.15-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1