CVE-2026-139098
published high CVSS 3.1 · 7.8tcp: avoid double destroy in tcp_abort() of an unaccepted child
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux372df1f2057c389490d4ae726eef9772a3a4d5f2 to < b6bdafd96b74ad0684f09599f9d56695c1854968 · bac76cf89816bff06c4ec2f3df97dc34e150a1c4 to < 35732ee7c3a78061dea9421d44d382c94f53ff6c · bac76cf89816bff06c4ec2f3df97dc34e150a1c4 to < ee9cfcb38b09569c50ce0ab3dabafa201c498ae1 · bac76cf89816bff06c4ec2f3df97dc34e150a1c4 to < 92f78b000427f5705171497135fe4f0d202c0a88 · bac76cf89816bff06c4ec2f3df97dc34e150a1c4 to < dbd62ad55a4c898f5a4c9edb20c0c062afb799df · b753821e069413d801a7c6df3c0b45cff2b443ad · 1c2ea2326afa066e915b489c4114c5f1944155af · 6.6.84 to < 6.6.163 · 6.1.132 to < 6.2 · 6.10.8 to < 6.11 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.11 (affected) · 0 to < 6.11 (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.119 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Pending Fix | Not stated | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: tcp: avoid double destroy in tcp_abort() of an unaccepted child tcp_abort() checks for TCP_CLOSE while only owning the socket lock, then grabs the BH lock before calling tcp_done_with_error(). For a child still sitting in a listener accept queue (which can be reached via SOCK_DESTROY or bpf_sock_destroy()), inet_csk_listen_stop() can run in this window: it only holds the child BH lock, and calls inet_child_forget(), which disconnects, orphans and destroys the child. tcp_abort() then calls tcp_done_with_error() -> tcp_done(), which sees SOCK_DEAD and calls inet_csk_destroy_sock() a second time, leading to a double sock_put() and a use-after-free. Recheck TCP_CLOSE after acquiring the BH lock, unless we just closed a listener ourselves, in which case tcp_done_with_error() must still run to report the error. Note that the WARN_ON(sock_owned_by_user(child)) in inet_csk_listen_stop() can still trigger in this window. [edumazet: recheck TCP_CLOSE under the BH lock instead of moving the test, smaller diff]
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - Both sides of the race are local calls on sockets the attacker owns: a NETLINK_SOCK_DIAG SOCK_DESTROY request (tcp_diag_destroy -> sock_diag_destroy -> tcp_abort) and close() of the listener (inet_csk_listen_stop). A remote peer only completes an ordinary handshake and supplies none of the bad state, so this is not a network attack. AC:L - The attacker runs both threads: SOCK_DESTROY on the unaccepted child and close() on its listener, over loopback. inet_csk_listen_stop must take the child's BH lock between tcp_abort's lock_sock/TCP_CLOSE check and its bh_lock_sock. A lost race just returns -ENOENT or closes the socket normally, so it can be retried indefinitely. CONFIG_INET_DIAG_DESTROY=y in Debian and Android. PR:L - sock_diag_destroy() only checks ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN), and inet_diag adds no other check. An unprivileged user who runs unshare -Urn gets that capability for sockets in their own netns, where the listener and child live. UI:N - The attacker creates the listener, connects to it without calling accept(), sends SOCK_DESTROY and closes the listener. No other user or administrator has to do anything. S:U - Freeing a tcp_sock early corrupts kernel memory inside the same kernel security authority; no guest/host or other isolation boundary is crossed. C:H - The second inet_csk_destroy_sock() sock_put frees the child tcp_sock while tcp_abort still uses it (bh_unlock_sock, release_sock, sock_gen_put). That use-after-free on a TCP socket slab object can be reclaimed and turned into a kernel memory read primitive. I:H - After the free, tcp_abort writes the spinlock and refcount of reclaimed memory and makes an indirect call through sk->sk_prot->release_cb in release_sock(). That can decrement another socket's refcount or hijack control flow. A:H - The double destroy underflows sk_refcnt and double-runs tcp_v4_destroy_sock and tcp_orphan_count_dec, which leads to refcount warnings, KASAN use-after-free reports or an oops. The WARN_ON(sock_owned_by_user(child)) in inet_csk_listen_stop also fires in this window, which panics systems with panic_on_warn set.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 372df1f2057c389490d4ae726eef9772a3a4d5f2 to < b6bdafd96b74ad0684f09599f9d56695c1854968 (affected · git)bac76cf89816bff06c4ec2f3df97dc34e150a1c4 to < 35732ee7c3a78061dea9421d44d382c94f53ff6c (affected · git)bac76cf89816bff06c4ec2f3df97dc34e150a1c4 to < ee9cfcb38b09569c50ce0ab3dabafa201c498ae1 (affected · git)bac76cf89816bff06c4ec2f3df97dc34e150a1c4 to < 92f78b000427f5705171497135fe4f0d202c0a88 (affected · git)bac76cf89816bff06c4ec2f3df97dc34e150a1c4 to < dbd62ad55a4c898f5a4c9edb20c0c062afb799df (affected · git)b753821e069413d801a7c6df3c0b45cff2b443ad (affected · git)1c2ea2326afa066e915b489c4114c5f1944155af (affected · git)6.6.84 to < 6.6.163 (affected · semver)6.1.132 to < 6.2 (affected · semver)6.10.8 to < 6.11 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 6.11 (affected)0 to < 6.11 (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.119 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
5- https://git.kernel.org/stable/c/35732ee7c3a78061dea9421d44d382c94f53ff6c
- https://git.kernel.org/stable/c/92f78b000427f5705171497135fe4f0d202c0a88
- https://git.kernel.org/stable/c/b6bdafd96b74ad0684f09599f9d56695c1854968
- https://git.kernel.org/stable/c/dbd62ad55a4c898f5a4c9edb20c0c062afb799df
- https://git.kernel.org/stable/c/ee9cfcb38b09569c50ce0ab3dabafa201c498ae1
Provider assertions
1Linux · cna
tcp: avoid double destroy in tcp_abort() of an unaccepted child
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- ff2ab89d3e168c6328e5f2dd90b9ebf3590d4ddb2442c8b7df0eb23054765574
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record