CVE-2026-31425: rds: ib: reject FRMR registration before IB connection is established
In the Linux kernel, the following vulnerability has been resolved:
rds: ib: reject FRMR registration before IB connection is established
rdsibgetmr() extracts the rdsibconnection from conn->ctransportdata and passes it to rdsibregfrmr() for FRWR memory registration. On a fresh outgoing connection, ic is allocated in rdsibconnalloc() with icmid = NULL because the connection worker has not yet called rdsibconnpathconnect() to create the rdmacmid. When sendmsg() with RDSCMSGRDMAMAP is called on such a connection, the sendmsg path parses the control message before any connection establishment, allowing rdsibpostregfrmr() to dereference ic->icmid->qp and crash the kernel.
The existing guard in rdsibregfrmr() only checks for !ic (added in commit 9e630bcb7701), which does not catch this case since ic is allocated early and is always non-NULL once the connection object exists.
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] RIP: 0010:rdsibpostregfrmr+0x50e/0x920 Call Trace: rdsibpostregfrmr (net/rds/ibfrmr.c:167) rdsibmapfrmr (net/rds/ibfrmr.c:252) rdsibregfrmr (net/rds/ibfrmr.c:430) rdsibgetmr (net/rds/ibrdma.c:615) rdsrdmamap (net/rds/rdma.c:295) rdscmsgrdmamap (net/rds/rdma.c:860) rdssendmsg (net/rds/send.c:1363) syssendmsg dosyscall64
Add a check in rdsibgetmr() that verifies ic, icmid, and qp are all non-NULL before proceeding with FRMR registration, mirroring the guard already present in rdsibpostinv(). Return -ENODEV when the connection is not ready, which the existing error handling in rdscmsgsend() converts to -EAGAIN for userspace retry and triggers rdsconnconnectifdown() to start the connection worker.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Compensating control
In rds_ib_get_mr(), verify that ic, i_cm_id, and qp are all non-NULL before proceeding with FRMR registration; return -ENODEV when the connection is not ready.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-31425?
The severity of CVE-2026-31425 is classified as medium, indicating that it may allow potential disruptions under specific conditions.
How do I fix CVE-2026-31425?
To fix CVE-2026-31425, update your Linux kernel to the latest version that includes the patched code resolving this issue.
What systems are affected by CVE-2026-31425?
CVE-2026-31425 affects the Linux kernel, particularly systems utilizing the RDS (Reliable Datagram Sockets) protocol.
What conditions trigger CVE-2026-31425 vulnerability?
CVE-2026-31425 can be triggered when a FRMR (Firmware Reliable Memory Region) registration request is made before an IB (InfiniBand) connection is established.
Is CVE-2026-31425 exploitable remotely?
CVE-2026-31425 is not considered a remotely exploitable vulnerability as it requires local access to the affected system to exploit.