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

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

tcp: avoid double destroy in tcpabort() of an unaccepted child

tcpabort() checks for TCPCLOSE while only owning the socket lock, then grabs the BH lock before calling tcpdonewitherror().

For a child still sitting in a listener accept queue (which can be reached via SOCKDESTROY or bpfsockdestroy()), inetcsklistenstop() can run in this window: it only holds the child BH lock, and calls inetchildforget(), which disconnects, orphans and destroys the child.

tcpabort() then calls tcpdonewitherror() -> tcpdone(), which sees SOCKDEAD and calls inetcskdestroysock() a second time, leading to a double sockput() and a use-after-free.

Recheck TCPCLOSE after acquiring the BH lock, unless we just closed a listener ourselves, in which case tcpdonewitherror() must still run to report the error.

Note that the WARNON(sockownedbyuser(child)) in inetcsklistenstop() can still trigger in this window.

[edumazet: recheck TCPCLOSE under the BH lock instead of moving the test, smaller diff]

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:31 PM
Data Sourced
via MITRE·01:31 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203