tcp: fix use-after-free of retransmit_skb_hint in tcp_send_synack()
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.15.222, 6.1.189, 6.6.158, 6.12.112, 6.18.55, and 1 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: tcp: fix use-after-free of retransmit_skb_hint in tcp_send_synack() When tcp_send_synack() replaces the cloned SYN skb at the head of the retransmit queue with a copy, it frees the original with tcp_rtx_queue_unlink_and_free() and only repairs tp->highest_sack. tp->retransmit_skb_hint keeps pointing at the freed skbuff_fclone_cache object. The dangling hint is read in tcp_verify_retransmit_hint() and used as the root of the rbtree walk in tcp_xmit_retransmit_queue(). An unprivileged TFO client (sendmsg(MSG_FASTOPEN)) can arm the hint with an attacker-supplied ICMP fragmentation-needed message, after which a simultaneous open frees the armed SYN skb: BUG: KASAN: slab-use-after-free in tcp_mark_skb_lost (net/ipv4/tcp_input.c:1316) Read of size 4 at addr ffff88800604d928 by task swapper/1/0 Call Trace: tcp_mark_skb_lost (net/ipv4/tcp_input.c:1316) tcp_simple_retransmit (net/ipv4/tcp_input.c:3158) tcp_v4_err (net/ipv4/tcp_ipv4.c:587) Sync the hint to the copy.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From c31b70c9968fe9c4194d1b5d06d07596a3b680de · fixed in fad6d429651e748365e93ca54645accc212f0018; From c31b70c9968fe9c4194d1b5d06d07596a3b680de · fixed in c5b4da1f403a658c1c19766be2b426003ada419f; From c31b70c9968fe9c4194d1b5d06d07596a3b680de · fixed in 71d45049b0d631dfdbf3c65305f7fca676de023b; From c31b70c9968fe9c4194d1b5d06d07596a3b680de · fixed in e3ea71cb1408a013ed4e8a757b815f1a919324bd; From c31b70c9968fe9c4194d1b5d06d07596a3b680de · fixed in 631aa4cb45099f09e9385dd786bd291c6270bfc4; From c31b70c9968fe9c4194d1b5d06d07596a3b680de · fixed in 0f87720c7e4bcab07c24888b3cf12bfe857bb90e; From c31b70c9968fe9c4194d1b5d06d07596a3b680de · fixed in fe99bbeee5c5dbd3abc30721a8079ced59649d97
- Linux Linux
5.11
- KernelLinux
From 5.11.0 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.55; From 6.19.0 · fixed in 7.2.9
References 7
git.kernel.org
- stable/c/fad6d429651e748365e93ca54645accc212f0018
- stable/c/c5b4da1f403a658c1c19766be2b426003ada419f
- stable/c/71d45049b0d631dfdbf3c65305f7fca676de023b
- stable/c/e3ea71cb1408a013ed4e8a757b815f1a919324bd
- stable/c/631aa4cb45099f09e9385dd786bd291c6270bfc4
- stable/c/0f87720c7e4bcab07c24888b3cf12bfe857bb90e
- stable/c/fe99bbeee5c5dbd3abc30721a8079ced59649d97