# CVE-2026-139098: tcp: avoid double destroy in tcp_abort() of an unaccepted child

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-01)
- Published: 2026-11-30T13:31:33.519Z
- Modified: 2026-12-01T06:17:34.650Z
- Assigned by: Linux

## 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]

(As written by CVE List.)

## Affected

- Linux Linux: from 372df1f2057c389490d4ae726eef9772a3a4d5f2 before b6bdafd96b74ad0684f09599f9d56695c1854968; from bac76cf89816bff06c4ec2f3df97dc34e150a1c4 before 35732ee7c3a78061dea9421d44d382c94f53ff6c; from bac76cf89816bff06c4ec2f3df97dc34e150a1c4 before ee9cfcb38b09569c50ce0ab3dabafa201c498ae1; from bac76cf89816bff06c4ec2f3df97dc34e150a1c4 before 92f78b000427f5705171497135fe4f0d202c0a88; from bac76cf89816bff06c4ec2f3df97dc34e150a1c4 before dbd62ad55a4c898f5a4c9edb20c0c062afb799df; b753821e069413d801a7c6df3c0b45cff2b443ad; 1c2ea2326afa066e915b489c4114c5f1944155af; from 6.6.84 before 6.6.163; from 6.1.132 before 6.2; from 6.10.8 before 6.11; 6.11 (not affected: before 6.11; from 6.6.163 up to 6.6.*; from 6.12.119 up to 6.12.*; from 6.18.65 up to 6.18.*; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/b6bdafd96b74ad0684f09599f9d56695c1854968>
- <https://git.kernel.org/stable/c/35732ee7c3a78061dea9421d44d382c94f53ff6c>
- <https://git.kernel.org/stable/c/ee9cfcb38b09569c50ce0ab3dabafa201c498ae1>
- <https://git.kernel.org/stable/c/92f78b000427f5705171497135fe4f0d202c0a88>
- <https://git.kernel.org/stable/c/dbd62ad55a4c898f5a4c9edb20c0c062afb799df>

## Sources

- CVE List: [CVE-2026-139098](https://www.cve.org/CVERecord?id=CVE-2026-139098), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-139098](https://nvd.nist.gov/vuln/detail/CVE-2026-139098), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-139098 · Whole record: https://cve.day/CVE-2026-139098.json · Rebuilt by cve.day 2026-12-01T06:32:24.221Z
