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

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

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]

ProductVersions
Linux Linux372df1f2057c389490d4ae726eef9772a3a4d5f2 to before b6bdafd96b74ad0684f09599f9d56695c1854968 Affectedbac76cf89816bff06c4ec2f3df97dc34e150a1c4 to before 35732ee7c3a78061dea9421d44d382c94f53ff6c Affectedbac76cf89816bff06c4ec2f3df97dc34e150a1c4 to before ee9cfcb38b09569c50ce0ab3dabafa201c498ae1 Affectedbac76cf89816bff06c4ec2f3df97dc34e150a1c4 to before 92f78b000427f5705171497135fe4f0d202c0a88 Affectedbac76cf89816bff06c4ec2f3df97dc34e150a1c4 to before dbd62ad55a4c898f5a4c9edb20c0c062afb799df Affectedb753821e069413d801a7c6df3c0b45cff2b443ad Affected1c2ea2326afa066e915b489c4114c5f1944155af Affected6.6.84 to before 6.6.163 Affected6.1.132 to before 6.2 Affected6.10.8 to before 6.11 Affected
Linux Linux6.11 Affectedbefore 6.11 Not Affected6.6.163 through 6.6.* Not Affected6.12.119 through 6.12.* Not Affected6.18.65 through 6.18.* Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.