AZL-117463: CVE-2026-139098 affecting package kernel 6.6.161.1-1
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
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The issue involves an unaccepted child TCP socket that is still in a listener's accept queue. A concurrent tcp_abort() path, reachable through SOCK_DESTROY or bpf_sock_destroy(), must race with inet_csk_listen_stop() while the child is being disconnected, orphaned, and destroyed.
What is the likely impact if the race occurs?
The race can cause tcp_abort() to destroy the child socket after inet_csk_listen_stop() has already destroyed it. This results in a double sock_put() and a use-after-free.
Is there any remaining warning condition after the fix?
Yes. The description notes that WARN_ON(sock_owned_by_user(child)) in inet_csk_listen_stop() can still trigger during this timing window.