net/rds: No shortcut out of RDS_CONN_ERROR
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5916e2c1554f3e36f770401c989c3c7fadf619ca · < 899ef00963ce76f9fc421a7d02335fe4ead6389b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/rds: No shortcut out of RDS_CONN_ERROR
RDS connections carry a state "rds_conn_path::cp_state" and transitions from one state to another and are conditional upon an expected state: "rds_conn_path_transition."
There is one exception to this conditionality, which is "RDS_CONN_ERROR" that can be enforced by "rds_conn_path_drop" regardless of what state the condition is currently in.
But as soon as a connection enters state "RDS_CONN_ERROR", the connection handling code expects it to go through the shutdown-path.
The RDS/TCP multipath changes added a shortcut out of "RDS_CONN_ERROR" straight back to "RDS_CONN_CONNECTING" via "rds_tcp_accept_one_path" (e.g. after "rds_tcp_state_change").
A subsequent "rds_tcp_reset_callbacks" can then transition the state to "RDS_CONN_RESETTING" with a shutdown-worker queued.
That'll trip up "rds_conn_init_shutdown", which was never adjusted to handle "RDS_CONN_RESETTING" and subsequently drops the connection with the dreaded "DR_INV_CONN_STATE", which leaves "RDS_SHUTDOWN_WORK_QUEUED" on forever.
From the CVE record · Linux
A Linux kernel RDS/TCP state transition can bypass the required shutdown path after a connection enters RDS_CONN_ERROR. Under the described sequence of state changes, shutdown can fail and leave shutdown work queued indefinitely; the input does not establish how an attacker could trigger this or whether authentication or user interaction is required.
Engineers running Linux kernels with RDS/TCP should check their kernel vendor’s advisory for affected versions; none are specified here.