{"api_version":"1","generated_at":"2026-12-04T05:37:28+00:00","cve":"CVE-2026-143292","urls":{"html":"https://cve.report/CVE-2026-143292","api":"https://cve.report/api/cve/CVE-2026-143292.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-143292","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-143292"},"summary":{"title":"tcp: wait for TIME_WAIT teardown before freeing per-netns ehash","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: wait for TIME_WAIT teardown before freeing per-netns ehash\n\ninet_twsk_kill() removes a TIME_WAIT socket from the established hash\nbefore it finishes using the ehash lock, hashinfo and bind tables, and\nbefore it drops the death-row reference. A running timer can therefore\nunhash its socket before inet_twsk_purge() reaches it. The purge cannot\nsynchronize with that timer, and tcp_sk_exit_batch() can free the\nprivate ehash and hashinfo while inet_twsk_kill() is still using them.\n\nAn unprivileged reproducer using user and network namespaces, a private\nTCP ehash and a FIN_WAIT2 timer triggers a KASAN slab-use-after-free in\ninet_twsk_kill(). The allocation and free stacks point to\ninet_pernet_hashinfo_alloc() and inet_pernet_hashinfo_free().\n\nWait for an RCU grace period after purging the whole batch, if one\nnetns in the batch uses a private ehash. TIME_WAIT removal runs with\nbottom halves disabled, so this also waits for removers that were\nalready invisible to the purge. Keep the wait under\ntcp_exit_batch_mutex, before freeing any private hashinfo.\n\nThe same window exists with the shared tcp_hashinfo. There, the\nhashinfo memory stays valid, but tcp_sk_exit_batch() can decrement\ntcp_death_row.tw_refcount from 2 to 1 before inet_twsk_kill() drops its\nown reference. This triggers the WARN_ON_ONCE() in tcp_sk_exit_batch(),\nthen a refcount_t \"decrement hit 0\" warning from inet_twsk_kill().\n\nAdding a grace period for the shared case would be costly on busy\nhosts. It is not needed: struct net is freed by a later cleanup_net(),\nafter the synchronize_rcu() in ops_undo_list(), so inet_twsk_kill()\ncan safely drop the last tw_refcount reference itself.\nUse refcount_dec_if_one() and only warn if tw_refcount is not 1\nafter a grace period.\n\n[edumazet: only call synchronize_net() if one netns in the batch uses a private ehash,\n use refcount_dec_if_one() to avoid a false WARN with the shared ehash]","state":"PUBLISHED","assigner":"Linux","published_at":"2026-12-03 10:18:14","updated_at":"2026-12-04 04:17:47"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/3f4e42618b5c2cbeb4e36a7b7fb1047cced39bce","name":"https://git.kernel.org/stable/c/3f4e42618b5c2cbeb4e36a7b7fb1047cced39bce","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/0a987038ea68d3c14ea905c817855b2e58ace158","name":"https://git.kernel.org/stable/c/0a987038ea68d3c14ea905c817855b2e58ace158","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/647b81ddefc6364290e67bf33c89d54971f8995e","name":"https://git.kernel.org/stable/c/647b81ddefc6364290e67bf33c89d54971f8995e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/068877fbd13041f01b9c20687a82c0773158b200","name":"https://git.kernel.org/stable/c/068877fbd13041f01b9c20687a82c0773158b200","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-143292","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143292","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d1e5e6408b305ff78b825d437df8d3f77e82a4be 068877fbd13041f01b9c20687a82c0773158b200 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d1e5e6408b305ff78b825d437df8d3f77e82a4be 3f4e42618b5c2cbeb4e36a7b7fb1047cced39bce git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d1e5e6408b305ff78b825d437df8d3f77e82a4be 0a987038ea68d3c14ea905c817855b2e58ace158 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d1e5e6408b305ff78b825d437df8d3f77e82a4be 647b81ddefc6364290e67bf33c89d54971f8995e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.120 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.66 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.7 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"143292","cve":"CVE-2026-143292","epss":"0.002090000","percentile":"0.116640000","score_date":"2026-12-03","updated_at":"2026-12-04 00:14:18"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/ipv4/tcp_ipv4.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"068877fbd13041f01b9c20687a82c0773158b200","status":"affected","version":"d1e5e6408b305ff78b825d437df8d3f77e82a4be","versionType":"git"},{"lessThan":"3f4e42618b5c2cbeb4e36a7b7fb1047cced39bce","status":"affected","version":"d1e5e6408b305ff78b825d437df8d3f77e82a4be","versionType":"git"},{"lessThan":"0a987038ea68d3c14ea905c817855b2e58ace158","status":"affected","version":"d1e5e6408b305ff78b825d437df8d3f77e82a4be","versionType":"git"},{"lessThan":"647b81ddefc6364290e67bf33c89d54971f8995e","status":"affected","version":"d1e5e6408b305ff78b825d437df8d3f77e82a4be","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/ipv4/tcp_ipv4.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.1"},{"lessThan":"6.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.120","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.66","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.7","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.120","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.66","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.7","versionStartIncluding":"6.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"6.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: wait for TIME_WAIT teardown before freeing per-netns ehash\n\ninet_twsk_kill() removes a TIME_WAIT socket from the established hash\nbefore it finishes using the ehash lock, hashinfo and bind tables, and\nbefore it drops the death-row reference. A running timer can therefore\nunhash its socket before inet_twsk_purge() reaches it. The purge cannot\nsynchronize with that timer, and tcp_sk_exit_batch() can free the\nprivate ehash and hashinfo while inet_twsk_kill() is still using them.\n\nAn unprivileged reproducer using user and network namespaces, a private\nTCP ehash and a FIN_WAIT2 timer triggers a KASAN slab-use-after-free in\ninet_twsk_kill(). The allocation and free stacks point to\ninet_pernet_hashinfo_alloc() and inet_pernet_hashinfo_free().\n\nWait for an RCU grace period after purging the whole batch, if one\nnetns in the batch uses a private ehash. TIME_WAIT removal runs with\nbottom halves disabled, so this also waits for removers that were\nalready invisible to the purge. Keep the wait under\ntcp_exit_batch_mutex, before freeing any private hashinfo.\n\nThe same window exists with the shared tcp_hashinfo. There, the\nhashinfo memory stays valid, but tcp_sk_exit_batch() can decrement\ntcp_death_row.tw_refcount from 2 to 1 before inet_twsk_kill() drops its\nown reference. This triggers the WARN_ON_ONCE() in tcp_sk_exit_batch(),\nthen a refcount_t \"decrement hit 0\" warning from inet_twsk_kill().\n\nAdding a grace period for the shared case would be costly on busy\nhosts. It is not needed: struct net is freed by a later cleanup_net(),\nafter the synchronize_rcu() in ops_undo_list(), so inet_twsk_kill()\ncan safely drop the last tw_refcount reference itself.\nUse refcount_dec_if_one() and only warn if tw_refcount is not 1\nafter a grace period.\n\n[edumazet: only call synchronize_net() if one netns in the batch uses a private ehash,\n use refcount_dec_if_one() to avoid a false WARN with the shared ehash]"}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:L - tcp_sk_exit_batch() frees the private hashinfo from cleanup_net() via ops_exit_list() when the attacker drops a netns created by unshare/clone(CLONE_NEWNET). No TCP segment carries the bad state: they write tcp_child_ehash_entries so tcp_set_hashinfo() calls inet_pernet_hashinfo_alloc(), then tcp_time_wait(TCP_FIN_WAIT2) arms the timer that races that free.\nAC:L - The attacker schedules tw_timer_handler() with setsockopt(TCP_LINGER2), which tcp_fin_time() turns into the tw timer, and runs tcp_sk_exit_batch() by exiting that same netns. inet_twsk_kill() unhashes the twsk before tcp_twsk_purge() can timer_shutdown_sync() it; repeating close against netns exit hits that window.\nPR:L - unshare_nsproxy_namespaces() allows CLONE_NEWNET with CAP_SYS_ADMIN in the caller's user namespace, and net_ctl_permissions() lets that namespace's CAP_NET_ADMIN write net.ipv4.tcp_child_ehash_entries (mode 0644). An unprivileged user can do this; init-namespace root is not required.\nUI:N - The attacker creates the user and net namespaces, writes the sysctl, connects and closes their own sockets so tcp_close() or tcp_rcv_state_process() reaches tcp_time_wait(), and drops the netns. No other user has to mount, accept, or click.\nS:U - inet_twsk_kill()'s use-after-free of the per-netns inet_hashinfo corrupts memory in the same kernel the local user is already running in. That is host kernel privilege escalation, not a guest-to-host or IOMMU boundary crossing.\nC:H - inet_pernet_hashinfo_free() kfree()s the inet_hashinfo from inet_pernet_hashinfo_alloc()'s kmemdup while inet_twsk_kill() still loads ehash_locks, bhash and bhash_size and dereferences them. Reclaiming that slab chooses those pointers, which is an arbitrary read rather than a few-byte leak.\nI:H - Once the hashinfo slab is reused, inet_twsk_kill() spin_lock()s attacker-chosen ehash_locks and bhash entries, and inet_twsk_bind_unhash() rewrites bind-hash lists and may kmem_cache_free() through bind2_bucket_cachep. Those are kernel write and control-flow primitives.\nA:H - KASAN reports a slab-use-after-free in inet_twsk_kill() on the hashinfo object tcp_sk_exit_batch() already passed to inet_pernet_hashinfo_free(). The FIN_WAIT2 timer touching that freed object oopses the kernel."}]}],"providerMetadata":{"dateUpdated":"2026-12-04T03:32:24.157Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/068877fbd13041f01b9c20687a82c0773158b200"},{"url":"https://git.kernel.org/stable/c/3f4e42618b5c2cbeb4e36a7b7fb1047cced39bce"},{"url":"https://git.kernel.org/stable/c/0a987038ea68d3c14ea905c817855b2e58ace158"},{"url":"https://git.kernel.org/stable/c/647b81ddefc6364290e67bf33c89d54971f8995e"}],"title":"tcp: wait for TIME_WAIT teardown before freeing per-netns ehash","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-143292","datePublished":"2026-12-03T09:21:26.953Z","dateReserved":"2026-12-03T03:10:28.365Z","dateUpdated":"2026-12-04T03:32:24.157Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-12-03 10:18:14","lastModifiedDate":"2026-12-04 04:17:47","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"143292","Ordinal":"1","Title":"tcp: wait for TIME_WAIT teardown before freeing per-netns ehash","CVE":"CVE-2026-143292","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"143292","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: wait for TIME_WAIT teardown before freeing per-netns ehash\n\ninet_twsk_kill() removes a TIME_WAIT socket from the established hash\nbefore it finishes using the ehash lock, hashinfo and bind tables, and\nbefore it drops the death-row reference. A running timer can therefore\nunhash its socket before inet_twsk_purge() reaches it. The purge cannot\nsynchronize with that timer, and tcp_sk_exit_batch() can free the\nprivate ehash and hashinfo while inet_twsk_kill() is still using them.\n\nAn unprivileged reproducer using user and network namespaces, a private\nTCP ehash and a FIN_WAIT2 timer triggers a KASAN slab-use-after-free in\ninet_twsk_kill(). The allocation and free stacks point to\ninet_pernet_hashinfo_alloc() and inet_pernet_hashinfo_free().\n\nWait for an RCU grace period after purging the whole batch, if one\nnetns in the batch uses a private ehash. TIME_WAIT removal runs with\nbottom halves disabled, so this also waits for removers that were\nalready invisible to the purge. Keep the wait under\ntcp_exit_batch_mutex, before freeing any private hashinfo.\n\nThe same window exists with the shared tcp_hashinfo. There, the\nhashinfo memory stays valid, but tcp_sk_exit_batch() can decrement\ntcp_death_row.tw_refcount from 2 to 1 before inet_twsk_kill() drops its\nown reference. This triggers the WARN_ON_ONCE() in tcp_sk_exit_batch(),\nthen a refcount_t \"decrement hit 0\" warning from inet_twsk_kill().\n\nAdding a grace period for the shared case would be costly on busy\nhosts. It is not needed: struct net is freed by a later cleanup_net(),\nafter the synchronize_rcu() in ops_undo_list(), so inet_twsk_kill()\ncan safely drop the last tw_refcount reference itself.\nUse refcount_dec_if_one() and only warn if tw_refcount is not 1\nafter a grace period.\n\n[edumazet: only call synchronize_net() if one netns in the batch uses a private ehash,\n use refcount_dec_if_one() to avoid a false WARN with the shared ehash]","Type":"Description","Title":"tcp: wait for TIME_WAIT teardown before freeing per-netns ehash"}]}}}