tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8336886f786fdacbc19b719c1f7ea91eb70706d4 · < fa4749c065644af4db496b338452a69a3e5147d9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().
syzbot reported the splat below where a socket had tcp_sk(sk)->fastopen_rsk in the TCP_ESTABLISHED state. [0]
syzbot reused the server-side TCP Fast Open socket as a new client before the TFO socket completes 3WHS:
1. accept() 2. connect(AF_UNSPEC) 3. connect() to another destination
As of accept(), sk->sk_state is TCP_SYN_RECV, and tcp_disconnect() changes it to TCP_CLOSE and makes connect() possible, which restarts timers.
Since tcp_disconnect() forgot to clear tcp_sk(sk)->fastopen_rsk, the retransmit timer triggered the warning and the intended packet was not retransmitted.
Let's call reqsk_fastopen_remove() in tcp_disconnect().
From the CVE record · Linux
The Linux kernel’s TCP disconnect path can leave stale Fast Open state on a socket. If a server-side TCP Fast Open socket is accepted, disconnected before the handshake completes, and then reused for a new connection, the retransmission timer can trigger a warning and fail to retransmit the intended packet. The report describes socket operations, not a remote attack or authentication requirement.
Engineers running Linux kernels with TCP Fast Open should check their kernel’s status; the issue was observed on a 6.17.0-rc5 development build, but no affected version range is provided.