Skip to contentSkip to conversation

CVE-2026-99212: net/rds: don't let the rdma_cm destroy an id RDS still owns on route failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

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.

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

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

	Issue introduced in 2.6.30 with commit 55b7ed0b582f9ff4bf3b9b44969cddda8c6763ea and fixed in 6.18.59 with commit a7c7d0ff876377fea7ae876a28d6df8d9349df57
	Issue introduced in 2.6.30 with commit 55b7ed0b582f9ff4bf3b9b44969cddda8c6763ea and fixed in 7.2.13 with commit 91ece3efa064f0b3b3c67b9b045d9eeb4a034e43
	Issue introduced in 2.6.30 with commit 55b7ed0b582f9ff4bf3b9b44969cddda8c6763ea and fixed in 7.3 with commit 98d446b7c013254a8a7b49720557676a3a851fde

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-99212

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:
net/rds/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/a7c7d0ff876377fea7ae876a28d6df8d9349df57
	https://git.kernel.org/stable/c/91ece3efa064f0b3b3c67b9b045d9eeb4a034e43
	https://git.kernel.org/stable/c/98d446b7c013254a8a7b49720557676a3a851fde