CVE-2024-36904: Linux Kernel TCP TIME-WAIT Socket Use-After-Free
- Vendors
- Debian ProjectLinux
CVE-2024-36904 is a use-after-free vulnerability caused by a race between inet_twsk_hashdance() and tcp_twsk_unique() in the Linux kernel TCP subsystem. inet_twsk_hashdance() publishes a TIME-WAIT socket in the established hash table and releases the bucket lock before initializing its reference counter. A concurrent connect() attempting port reuse can find the socket and call sock_hold() while its reference count is zero. Subsequent reference-counter initialization overwrites the increment or saturated counter, leaving reference accounting unbalanced and permitting premature socket release. The flaw can cause kernel memory corruption and service disruption.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
The race can produce reference-count warnings, underflow, and premature freeing of TCP TIME-WAIT sockets, potentially causing kernel crashes or other memory-corruption effects. Researchers confirmed an actual use-after-free in inet_twsk_put() using a modified, KASAN-enabled research kernel. Successful privilege escalation or arbitrary code execution is not established by the available information.
Mitigation
If you can’t patch tonight, do this now.
No complete operational workaround is available. Until patching is possible, reduce exposure to untrusted local workloads and network activity capable of generating high rates of concurrent TCP connection attempts and TIME-WAIT port-reuse races. Monitor kernel logs for reference-count warnings involving TCP TIME-WAIT socket handling; detection does not remediate the race.
Remediation
Patch, then assume compromise.
Install a vendor-supported kernel update containing the change to use refcount_inc_not_zero() in tcp_twsk_unique(), abandoning port reuse when the reference count is zero. Fixed upstream stable releases include 4.19.314, 5.4.276, 5.10.217, 5.15.159, 6.1.91, 6.6.31, and 6.8.10. Distribution kernels may incorporate backported fixes without matching these upstream versions. Applicable Red Hat updates include RHSA-2024:4583 for RHEL 9, RHSA-2024:4823 for RHEL 9.2, RHSA-2024:5692 for RHEL 8.6, and RHSA-2024:6206 for RHEL 8.8. Reboot into the updated kernel.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2024-36904 exploited in the wild?
- As of Oct 19, 2026, Mallory has no reports of CVE-2024-36904 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2024-36904?
- As of Oct 19, 2026, Mallory has found no public exploit for CVE-2024-36904.
- Is there a patch for CVE-2024-36904?
- Install a vendor-supported kernel update containing the change to use refcount_inc_not_zero() in tcp_twsk_unique(), abandoning port reuse when the reference count is zero. Fixed upstream stable releases include 4.19.314, 5.4.276, 5.10.217, 5.15.159, 6.1.91, 6.6.31, and 6.8.10.
- What products are affected by CVE-2024-36904?
- Linux Kernel and Debian Project Debian Linux.
- How severe is CVE-2024-36904?
- CVE-2024-36904 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 0.66% (46th percentile) as of Oct 19, 2026.
Recent activity
12 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.