rds: ib: use rds_conn_drop() on protocol version mismatch
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f147dd9ecabf23fd63d2562ffe64252a0453ecde · < 65ca0a5037152a5a80b8fe6aac80eb80458be573| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
rds: ib: use rds_conn_drop() on protocol version mismatch
rds_ib_cm_connect_complete() runs from the RDMA-CM event handler with conn->c_cm_lock held. When the peer negotiates a protocol version older than RDS_PROTOCOL_COMPAT_VERSION, the handler calls rds_conn_destroy(), which is only safe in the rmmod path: it synchronously tears the connection down and flush_work()es the shutdown work cp_down_w.
That shutdown work (rds_conn_shutdown()) needs cp_cm_lock, which is the very lock the event handler still holds, so the flush never completes: the two workers wait on each other and the RDS connection workqueues stall for good.
All other RDMA-CM failure paths (REJECTED, CONNECT_ERROR, DISCONNECTED) use rds_conn_drop(), which marks the connection RDS_CONN_ERROR and schedules the shutdown work asynchronously. Use it here as well.
From the CVE record · Linux
The Linux kernel's RDS over InfiniBand connection handler can deadlock when a peer negotiates a protocol version older than RDS_PROTOCOL_COMPAT_VERSION. This stalls RDS connection workqueues. The input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with RDS over InfiniBand should check whether their kernel is affected; affected versions are not specified.