CVE-2026-99166: net: rds: fix uninitialized trans dereference in CM event handler
In the Linux kernel, the following vulnerability has been resolved:
net: rds: fix uninitialized trans dereference in CM event handler
rdsrdmacmeventhandlercmn() assigns trans only when the RDMA device is an InfiniBand CA (RDMANODEIBCA). On any other device type, e.g. an iWARP RNIC such as siw, trans stays uninitialized, but the event switch dereferences it: unconditionally in the RDMACMEVENTCONNECTREQUEST case via trans->cmhandleconnect(), and (with a connection context) in the ROUTERESOLVED and ESTABLISHED cases.
An RDS listener on an iWARP device therefore crashes the kernel as soon as a connect request arrives: with CONFIGINITSTACKALLZERO the wild load becomes a NULL dereference at offset 0xa0 (&trans->cmhandleconnect) in the iwcmwq workqueue.
GCC masks the bug in default builds by folding the uninitialized load into &rdsibtransport; Clang-built kernels take the real uninitialized path and oops.
The active side can land on a non-IB device too: the id that rdsibconnpathconnect() creates is not restricted to a node type, so rdmaresolveaddr() binds it to whichever device serves the local address, and an iWARP RNIC on the same netdev qualifies. The crash there is different: resolving a route on an iWARP id never fills in cmid->route.pathrec, and the ROUTERESOLVED case writes pathrec[0].sl before it calls into the transport.
The iWARP transport was dropped long ago and IB is the only transport left, so make that explicit: initialize trans to &rdsibtransport at declaration, drop the conditional assignment, reject a connect request that arrives on a non-IB device, and drop a connection whose address resolved to one instead of resolving a route on it. The rejection is limited to RDMACMEVENTCONNECTREQUEST on purpose: a non-zero return from the handler makes rdmacm destroy the id the event was delivered on, which is right for the request's freshly created id but would free a connection id that RDS still owns for any other event. On the active side the id stays ic->icmid and the connection's shutdown destroys it, so that case returns 0.
[achender: reject only on RDMACMEVENTCONNECTREQUEST instead of bailing out for every event on a non-IB device, so that rdmacm does not destroy connection ids RDS still tracks; drop a connection whose address resolved to a non-IB device before a route is resolved on it; changelog adjusted]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.273 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.224 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.161 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.115 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.59 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.13 - Upgrade
Upgrade
azurelinux/kernelto a version that resolves this vulnerability.Fixed in 6.6.161.1-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.13-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.115-2~deb12u1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-2Fixed in 6.12.117-1Fixed in 7.2.15-1Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.117-1~deb12u1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.3.0-10.10 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.3.0-1004.5 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Compensating control
In net/rds CM event handling, initialize trans to &rds_ib_transport at its declaration and remove the conditional assignment; reject RDMA_CM_EVENT_CONNECT_REQUEST events on non-IB devices, and drop connections whose address resolves to a non-IB device before resolving a route.
Event History
Frequently Asked Questions
Which deployments are exposed to the crash condition?
RDS listeners using a non-InfiniBand RDMA device, such as an iWARP RNIC including siw, are exposed when a connect request arrives. Active RDS connections can also select a non-IB device when address resolution binds the connection to the device serving the local address.
What is required to trigger the issue?
For an affected RDS listener, a connect request must arrive on an iWARP or other non-IB device. On the active side, the connection path must resolve to a non-IB RDMA device; the connection ID is not restricted to a particular node type.
Does the compiler or stack-initialization configuration affect the observed behavior?
GCC default builds can mask the issue by folding the uninitialized load into the address of rds_ib_transport. Clang-built kernels take the actual uninitialized path and can oops; with CONFIG_INIT_STACK_ALL_ZERO, the failure becomes a NULL dereference at the cm_handle_connect offset in the iw_cm_wq workqueue.