Linux: rds: ib: use rds_conn_drop() on protocol version mismatch
What fixes it
- 424019be3f637da76b74f44a40034669acbb166fLinuxCVE List
- 14fb90067d13f4494cff0f03243fae3cf2911cbcLinuxCVE List
- 344c72a0bc2703a6de4918ed935850e07dae3af2LinuxCVE List
- 65ca0a5037152a5a80b8fe6aac80eb80458be573LinuxCVE List
- 7d8c22cb2cb1efb5e830a4545c76abf7b35cc2e8LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
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.
Text from CVE List
Affected versions 18
- Linuxaffected: f147dd9ecabf23fd63d2562ffe64252a0453ecde before 424019be3f637da76b74f44a40034669acbb166fCVE List
- Linuxaffected: f147dd9ecabf23fd63d2562ffe64252a0453ecde before 14fb90067d13f4494cff0f03243fae3cf2911cbcCVE List
- Linuxaffected: f147dd9ecabf23fd63d2562ffe64252a0453ecde before 344c72a0bc2703a6de4918ed935850e07dae3af2CVE List
- Linuxaffected: f147dd9ecabf23fd63d2562ffe64252a0453ecde before b5c9f2951d330d4a198a64d6e60f79b4bd6ef078CVE List
- Linuxaffected: f147dd9ecabf23fd63d2562ffe64252a0453ecde before d392b16acd0908f077289aad8bba066ff16de336CVE List
- Linuxaffected: f147dd9ecabf23fd63d2562ffe64252a0453ecde before 65ca0a5037152a5a80b8fe6aac80eb80458be573CVE List
- Linuxaffected: f147dd9ecabf23fd63d2562ffe64252a0453ecde before 7d8c22cb2cb1efb5e830a4545c76abf7b35cc2e8CVE List
- Linuxaffected: f147dd9ecabf23fd63d2562ffe64252a0453ecde before f97d8c7bab7843631206a114986c9059da03efebCVE List
- Linuxaffected: 2.6.37CVE List
- Linuxunaffected: all versions before 2.6.37CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.112 through 6.12.*CVE List
- Linuxunaffected: 6.18.54 through 6.18.*CVE List
- Linuxunaffected: 7.2.8 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 8
- git.kernel.org/stable/c/424019be3f637da76b74f44a40034669acbb166fReferencevia CVE List
- git.kernel.org/stable/c/14fb90067d13f4494cff0f03243fae3cf2911cbcReferencevia CVE List
- git.kernel.org/stable/c/344c72a0bc2703a6de4918ed935850e07dae3af2Referencevia CVE List
- git.kernel.org/stable/c/b5c9f2951d330d4a198a64d6e60f79b4bd6ef078Referencevia CVE List
- git.kernel.org/stable/c/d392b16acd0908f077289aad8bba066ff16de336Referencevia CVE List
- git.kernel.org/stable/c/65ca0a5037152a5a80b8fe6aac80eb80458be573Referencevia CVE List
- git.kernel.org/stable/c/7d8c22cb2cb1efb5e830a4545c76abf7b35cc2e8Referencevia CVE List
- git.kernel.org/stable/c/f97d8c7bab7843631206a114986c9059da03efebReferencevia CVE List