EnvMap GitHub

CVE-2026-143292

tcp: wait for TIME_WAIT teardown before freeing per-netns ehash

EPSS 0.18%Received

Description

In the Linux kernel, the following vulnerability has been resolved: tcp: wait for TIME_WAIT teardown before freeing per-netns ehash inet_twsk_kill() removes a TIME_WAIT socket from the established hash before it finishes using the ehash lock, hashinfo and bind tables, and before it drops the death-row reference. A running timer can therefore unhash its socket before inet_twsk_purge() reaches it. The purge cannot synchronize with that timer, and tcp_sk_exit_batch() can free the private ehash and hashinfo while inet_twsk_kill() is still using them. An unprivileged reproducer using user and network namespaces, a private TCP ehash and a FIN_WAIT2 timer triggers a KASAN slab-use-after-free in inet_twsk_kill(). The allocation and free stacks point to inet_pernet_hashinfo_alloc() and inet_pernet_hashinfo_free(). Wait for an RCU grace period after purging the whole batch, if one netns in the batch uses a private ehash. TIME_WAIT removal runs with bottom halves disabled, so this also waits for removers that were already invisible to the purge. Keep the wait under tcp_exit_batch_mutex, before freeing any private hashinfo. The same window exists with the shared tcp_hashinfo. There, the hashinfo memory stays valid, but tcp_sk_exit_batch() can decrement tcp_death_row.tw_refcount from 2 to 1 before inet_twsk_kill() drops its own reference. This triggers the WARN_ON_ONCE() in tcp_sk_exit_batch(), then a refcount_t "decrement hit 0" warning from inet_twsk_kill(). Adding a grace period for the shared case would be costly on busy hosts. It is not needed: struct net is freed by a later cleanup_net(), after the synchronize_rcu() in ops_undo_list(), so inet_twsk_kill() can safely drop the last tw_refcount reference itself. Use refcount_dec_if_one() and only warn if tw_refcount is not 1 after a grace period. [edumazet: only call synchronize_net() if one netns in the batch uses a private ehash, use refcount_dec_if_one() to avoid a false WARN with the shared ehash]

In the words of the organisation that published it (Linux).

Severity

  • 7.8 High · CVSS 3.1 from 416baaa9-dc9f-4396-8d5f-8c081fb06d67 · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected

  • Linux: from d1e5e6408b305ff78b825d437df8d3f77e82a4be before 068877fbd13041f01b9c20687a8; from d1e5e6408b305ff78b825d437df8d3f77e82a4be before 3f4e42618b5c2cbeb4e36a7b7fb; from d1e5e6408b305ff78b825d437df8d3f77e82a4be before 0a987038ea68d3c14ea905c8178; from d1e5e6408b305ff78b825d437df8d3f77e82a4be before 647b81ddefc6364290e67bf33c8; 6.1

as the publisher (Linux) lists them.

Likelihood of exploitation

FIRST's EPSS gives a 0.18% chance of exploitation in the next 30 days, higher than 8% of all CVEs (as of 4 December 2026).

References

Record

Published10:18 UTC, 3 December 2026
Last changed04:17 UTC, 4 December 2026
NVD statusReceived
Published byLinux

CVE-2026-143292 on NVD · on CVE.org · Security Briefing

Follow it

Add the feed to a feed reader and new items arrive there as they are published, with no account here and no email.

Add to Feedly Add to Inoreader

Any other reader: paste https://envmap.tech/security/feed.xml

Where this comes from

Nothing here is written by an AI, summarised or rewritten: a headline is its newsroom's own and opens its story. A description is in the words of the organisation that published the CVE; a score says whose it is, NVD's or the publisher's; a CVE nobody has scored yet says so. A CVE that is rejected comes off every list. When a source does not answer, the page keeps the last answer it gave and says since when.

How to read it

EnvMap is a free, open-source DevOps control plane that you run yourself; its Security page brings your scanners' findings into one place. See what it does.