KernelScan.io

HIGH Introduced in 2.6.30

rds RdmaCmId UAF

CVE-2026-99212

CVSS 7.0 / 10.0 NVD

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.0HIGH

01

In the Linux kernel, the following vulnerability has been resolved: net/rds: don't let the rdma_cm destroy an id RDS still owns on route failure rds_rdma_cm_event_handler_cmn() hands the return value of rdma_resolve_route() straight back to the rdma_cm on RDMA_CM_EVENT_ADDR_RESOLVED. A synchronous failure there - -ENOMEM from the route work allocation, an SA query that cannot be set up, a RoCE route with no usable device - makes addr_handler() destroy the id the event was delivered on. That id is ic->i_cm_id, and nothing clears the pointer: the connection sits in RDS_CONN_CONNECTING with a freed id until its shutdown calls rdma_disconnect() and rdma_destroy_id() on it. The ROUTE_RESOLVED case already avoids this: rds_ib_cm_initiate_connect() forces a zero return while ic->i_cm_id == cm_id, as the comment there explains. Do the same here - drop the connection and return 0 - so the id stays RDS's to destroy from the shutdown, and the reconnect gets a fresh one.

02

Engine v0.9.0

Risk summary

A local attacker with CAP_NET_ADMIN (obtainable in a user namespace) can trigger a use-after-free in the RDS RDMA transport by initiating a connection that fails synchronous route resolution. This leads to kernel memory corruption, enabling privilege escalation or denial of service. Cluster environments using RDS over RoCE or InfiniBand are primarily at risk.

Affectednet/rds/rdma_transport.c (RDS RDMA transport)

Vulnerability analysis

When an RDS connection over RDMA receives an address-resolved event, the kernel calls rdma_resolve_route() to find a path. If that call fails synchronously — for example due to memory exhaustion, an SA query setup failure, or a RoCE route with no usable device — the RDMA CM immediately destroys the connection ID (cm_id). However, the RDS connection structure still stores a pointer to that now-freed ID (ic->i_cm_id) and remains in a connecting state. Later, when the connection is shut down, the kernel attempts to disconnect and destroy the same ID a second time, causing a use-after-free. The fix detects the synchronous failure, drops the connection cleanly via rds_conn_drop(), and returns zero to the RDMA CM so it does not destroy the ID, leaving lifecycle management to the RDS shutdown path. The bug is reachable by any local user who can create RDS sockets and initiate connections (requiring CAP_NET_ADMIN or CAP_NET_RAW, which are available inside user namespaces), and can be triggered by causing memory pressure or targeting misconfigured RoCE destinations.

03

BranchIntroducedFixed inPatch commit
5.152.6.305.15.224664fd3205cbe
6.12.6.306.1.191b8f141f65885
6.122.6.306.12.11592143c5d8038
6.182.6.306.18.59a7c7d0ff8763
6.62.6.306.6.161e677eda15df7
7.22.6.307.2.1391ece3efa064
mainline2.6.307.398d446b7c013
cip/6.122.6.306.12.117-cip3592143c5d8038

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.117-cip35
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip137)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip137-rt51)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip116)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)