tcp: Fix out-of-bounds access for twsk in tcp_ao_established_key().
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tcp: Fix out-of-bounds access for twsk in tcp_ao_established_key().
lockdep_sock_is_held() was added in tcp_ao_established_key() by the cited commit.
It can be called from tcp_v[46]_timewait_ack() with twsk.
Since it does not have sk->sk_lock, the lockdep annotation results in out-of-bound access.
$ pahole -C tcp_timewait_sock vmlinux | grep size /* size: 288, cachelines: 5, members: 8 */ $ pahole -C sock vmlinux | grep sk_lock socket_lock_t sk_lock; /* 440 192 */
Let's not use lockdep_sock_is_held() for TCP_TIME_WAIT.
From the CVE record · Linux
The Linux kernel's tcp_ao_established_key() can access memory out of bounds when called with a TCP time-wait socket from tcp_v4_timewait_ack() or tcp_v6_timewait_ack(). The input does not establish what an attacker could do or whether exploitation requires network access, authentication, or user interaction.
Engineers running Linux kernels should check whether their kernel includes the affected TCP code; affected versions were not specified.