CVE-2025-40186: Linux Kernel TCP Fast Open Request-Socket Double Free
- Vendor
- Linux
CVE-2025-40186 is a race condition in Linux kernel TCP Fast Open request-socket lifetime management. If a listening socket closes while tcp_conn_request() processes a TCP Fast Open socket, inet_csk_reqsk_queue_add() can leave reqsk->sk unset and invoke inet_child_forget(), which calls tcp_disconnect(). That disconnect path calls reqsk_fastopen_remove() and releases a request-socket reference. A redundant reqsk_fastopen_remove() call in tcp_conn_request() then releases the final reference, freeing the request socket. Subsequent cleanup through __reqsk_free() causes a listener reference-count underflow and double free, producing a use-after-free condition and potential kernel compromise.
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.
Successful exploitation can corrupt kernel memory and cause a kernel panic or system-wide denial of service. The memory-corruption condition could potentially permit arbitrary code execution with elevated privileges, compromising system confidentiality and integrity. Privilege escalation is a potential consequence, not an established outcome of the reported reproducer.
Mitigation
If you can’t patch tonight, do this now.
No vulnerability-specific temporary workaround is established. Until the kernel is patched, restrict untrusted local access and reduce exposure of affected network services as defense-in-depth measures. Where available for the exact kernel and platform, deploy a vendor-supported live patch addressing CVE-2025-40186.
Remediation
Patch, then assume compromise.
Install a vendor-supported kernel update containing the fix that removes reqsk_fastopen_remove() from tcp_conn_request(), then reboot into the updated kernel and verify the running version. Fixed upstream releases include 5.4.301, 5.10.246, 5.15.195, 6.1.157, 6.6.113, 6.12.54, and 6.17.4; the fix also appears in 6.18-rc1. Prefer the latest supported stable release or the applicable distribution security update rather than independently cherry-picking the patch. Distribution kernels may contain backported fixes without matching upstream version numbers.
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-2025-40186 exploited in the wild?
- As of Nov 19, 2026, Mallory has no reports of CVE-2025-40186 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2025-40186?
- As of Nov 19, 2026, Mallory has found no public exploit for CVE-2025-40186.
- Is there a patch for CVE-2025-40186?
- Install a vendor-supported kernel update containing the fix that removes reqsk_fastopen_remove() from tcp_conn_request(), then reboot into the updated kernel and verify the running version. Fixed upstream releases include 5.4.301, 5.10.246, 5.15.195, 6.1.157, 6.6.113, 6.12.54, and 6.17.4; the fix also appears in 6.18-rc1.
- What products are affected by CVE-2025-40186?
- Linux Kernel.
- How severe is CVE-2025-40186?
- CVE-2025-40186 has a CVSS v3.1 score of 8.1 (High) and an EPSS score of 0.82% (55th percentile) as of Nov 19, 2026.
Recent activity
33 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.