{"id":"CVE-2026-139098","state":"PUBLISHED","title":"tcp: avoid double destroy in tcp_abort() of an unaccepted child","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: avoid double destroy in tcp_abort() of an unaccepted child\n\ntcp_abort() checks for TCP_CLOSE while only owning the socket lock,\nthen grabs the BH lock before calling tcp_done_with_error().\n\nFor a child still sitting in a listener accept queue (which can be\nreached via SOCK_DESTROY or bpf_sock_destroy()), inet_csk_listen_stop()\ncan run in this window: it only holds the child BH lock, and calls\ninet_child_forget(), which disconnects, orphans and destroys the child.\n\ntcp_abort() then calls tcp_done_with_error() -> tcp_done(), which sees\nSOCK_DEAD and calls inet_csk_destroy_sock() a second time, leading to\na double sock_put() and a use-after-free.\n\nRecheck TCP_CLOSE after acquiring the BH lock, unless we just closed\na listener ourselves, in which case tcp_done_with_error() must still\nrun to report the error.\n\nNote that the WARN_ON(sock_owned_by_user(child)) in\ninet_csk_listen_stop() can still trigger in this window.\n\n[edumazet: recheck TCP_CLOSE under the BH lock instead of moving the test, smaller diff]","publishedAt":"2026-11-30T13:31:33.519Z","updatedAt":"2026-11-30T13:31:33.519Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"372df1f2057c389490d4ae726eef9772a3a4d5f2","status":"affected","lessThan":"b6bdafd96b74ad0684f09599f9d56695c1854968","versionType":"git"},{"version":"bac76cf89816bff06c4ec2f3df97dc34e150a1c4","status":"affected","lessThan":"35732ee7c3a78061dea9421d44d382c94f53ff6c","versionType":"git"},{"version":"bac76cf89816bff06c4ec2f3df97dc34e150a1c4","status":"affected","lessThan":"ee9cfcb38b09569c50ce0ab3dabafa201c498ae1","versionType":"git"},{"version":"bac76cf89816bff06c4ec2f3df97dc34e150a1c4","status":"affected","lessThan":"92f78b000427f5705171497135fe4f0d202c0a88","versionType":"git"},{"version":"bac76cf89816bff06c4ec2f3df97dc34e150a1c4","status":"affected","lessThan":"dbd62ad55a4c898f5a4c9edb20c0c062afb799df","versionType":"git"},{"version":"b753821e069413d801a7c6df3c0b45cff2b443ad","status":"affected","versionType":"git"},{"version":"1c2ea2326afa066e915b489c4114c5f1944155af","status":"affected","versionType":"git"},{"version":"6.6.84","status":"affected","lessThan":"6.6.163","versionType":"semver"},{"version":"6.1.132","status":"affected","lessThan":"6.2","versionType":"semver"},{"version":"6.10.8","status":"affected","lessThan":"6.11","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp.c"]}],"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"],"weaknesses":[],"ingestedAt":"2026-11-30T13:42:04.437Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139098.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139098","state":"PUBLISHED","datePublished":"2026-11-30T13:31:33.519Z","dateUpdated":"2026-11-30T13:31:33.519Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.914Z"},"containers":{"cna":{"title":"tcp: avoid double destroy in tcp_abort() of an unaccepted child","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: avoid double destroy in tcp_abort() of an unaccepted child\n\ntcp_abort() checks for TCP_CLOSE while only owning the socket lock,\nthen grabs the BH lock before calling tcp_done_with_error().\n\nFor a child still sitting in a listener accept queue (which can be\nreached via SOCK_DESTROY or bpf_sock_destroy()), inet_csk_listen_stop()\ncan run in this window: it only holds the child BH lock, and calls\ninet_child_forget(), which disconnects, orphans and destroys the child.\n\ntcp_abort() then calls tcp_done_with_error() -> tcp_done(), which sees\nSOCK_DEAD and calls inet_csk_destroy_sock() a second time, leading to\na double sock_put() and a use-after-free.\n\nRecheck TCP_CLOSE after acquiring the BH lock, unless we just closed\na listener ourselves, in which case tcp_done_with_error() must still\nrun to report the error.\n\nNote that the WARN_ON(sock_owned_by_user(child)) in\ninet_csk_listen_stop() can still trigger in this window.\n\n[edumazet: recheck TCP_CLOSE under the BH lock instead of moving the test, smaller diff]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"372df1f2057c389490d4ae726eef9772a3a4d5f2","status":"affected","lessThan":"b6bdafd96b74ad0684f09599f9d56695c1854968","versionType":"git"},{"version":"bac76cf89816bff06c4ec2f3df97dc34e150a1c4","status":"affected","lessThan":"35732ee7c3a78061dea9421d44d382c94f53ff6c","versionType":"git"},{"version":"bac76cf89816bff06c4ec2f3df97dc34e150a1c4","status":"affected","lessThan":"ee9cfcb38b09569c50ce0ab3dabafa201c498ae1","versionType":"git"},{"version":"bac76cf89816bff06c4ec2f3df97dc34e150a1c4","status":"affected","lessThan":"92f78b000427f5705171497135fe4f0d202c0a88","versionType":"git"},{"version":"bac76cf89816bff06c4ec2f3df97dc34e150a1c4","status":"affected","lessThan":"dbd62ad55a4c898f5a4c9edb20c0c062afb799df","versionType":"git"},{"version":"b753821e069413d801a7c6df3c0b45cff2b443ad","status":"affected","versionType":"git"},{"version":"1c2ea2326afa066e915b489c4114c5f1944155af","status":"affected","versionType":"git"},{"version":"6.6.84","status":"affected","lessThan":"6.6.163","versionType":"semver"},{"version":"6.1.132","status":"affected","lessThan":"6.2","versionType":"semver"},{"version":"6.10.8","status":"affected","lessThan":"6.11","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/tcp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b6bdafd96b74ad0684f09599f9d56695c1854968"},{"url":"https://git.kernel.org/stable/c/35732ee7c3a78061dea9421d44d382c94f53ff6c"},{"url":"https://git.kernel.org/stable/c/ee9cfcb38b09569c50ce0ab3dabafa201c498ae1"},{"url":"https://git.kernel.org/stable/c/92f78b000427f5705171497135fe4f0d202c0a88"},{"url":"https://git.kernel.org/stable/c/dbd62ad55a4c898f5a4c9edb20c0c062afb799df"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:31:33.519Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.84","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"7.4-rc1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.132"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}