CVE-2025-38097
espintcp: remove encap socket caching to avoid reference leak
Mitigation
- Upgrade Linux to 028363685bd0b7a19b4a820f82dd905b1dc83999 or later.
Who should check
- Anyone running Linux >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e32bafd08ee35feacd47b05cc5bfe9cd9659cd25; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9673ca00e6c5503069dc98780e2e89db0e663c16; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e4cde54b46a87231c77256a633be1bef62687d69; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < b58a295d10065960bcb9d60cb8ca6ead9837cd27; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9cbca30102028f9ad3d2098f935c4368f581fd07; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 74fd327767fb784c5875cf7c4ba1217f26020943; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 028363685bd0b7a19b4a820f82dd905b1dc83999
- Anyone running Linux 5.6
Vulnerability facts
- Affected
- Linux >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e32bafd08ee35feacd47b05cc5bfe9cd9659cd25; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9673ca00e6c5503069dc98780e2e89db0e663c16; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e4cde54b46a87231c77256a633be1bef62687d69; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < b58a295d10065960bcb9d60cb8ca6ead9837cd27; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9cbca30102028f9ad3d2098f935c4368f581fd07; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 74fd327767fb784c5875cf7c4ba1217f26020943; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 028363685bd0b7a19b4a820f82dd905b1dc83999; Linux 5.6
- Fixed in
- Linux 9673ca00e6c5503069dc98780e2e89db0e663c16, Linux 9cbca30102028f9ad3d2098f935c4368f581fd07, Linux 74fd327767fb784c5875cf7c4ba1217f26020943, Linux 028363685bd0b7a19b4a820f82dd905b1dc83999
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.29% chance of exploitation in 30 days (percentile 14, 2026-11-26)
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: espintcp: remove encap socket caching to avoid reference leak The current scheme for caching the encap socket can lead to reference leaks when we try to delete the netns. The reference chain is: xfrm_state -> enacp_sk -> netns Since the encap socket is a userspace socket, it holds a reference on the netns. If we delete the espintcp state (through flush or individual delete) before removing the netns, the reference on the socket is dropped and the netns is correctly deleted. Otherwise, the netns may not be reachable anymore (if all processes within the ns have terminated), so we cannot delete the xfrm state to drop its reference on the socket. This patch results in a small (~2% in my tests) performance regression. A GC-type mechanism could be added for the socket cache, to clear references if the state hasn't been used "recently", but it's a lot more complex than just not caching the socket.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e32bafd08ee35feacd47b05cc5bfe9cd9659cd25; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9673ca00e6c5503069dc98780e2e89db0e663c16; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e4cde54b46a87231c77256a633be1bef62687d69; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < b58a295d10065960bcb9d60cb8ca6ead9837cd27; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9cbca30102028f9ad3d2098f935c4368f581fd07; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 74fd327767fb784c5875cf7c4ba1217f26020943; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 028363685bd0b7a19b4a820f82dd905b1dc83999 | — | cvelist |
| Linux | 5.6 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-38097. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-38097.md Affected: Linux >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e32bafd08ee35feacd47b05cc5bfe9cd9659cd25; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9673ca00e6c5503069dc98780e2e89db0e663c16; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e4cde54b46a87231c77256a633be1bef62687d69; >= e27cca96cd68fa2c6814c90… Fixed in: Linux 9673ca00e6c5503069dc98780e2e89db0e663c16, Linux 9cbca30102028f9ad3d2098f935c4368f581fd07, Linux 74fd327767fb784c5875cf7c4ba1217f26020943, Linux 028363685bd0b7a19b4a820f82dd905b1dc83999 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/e4cde54b46a87231c77256a633be1bef62687d69
- https://git.kernel.org/stable/c/b58a295d10065960bcb9d60cb8ca6ead9837cd27
- https://git.kernel.org/stable/c/9cbca30102028f9ad3d2098f935c4368f581fd07
- https://git.kernel.org/stable/c/74fd327767fb784c5875cf7c4ba1217f26020943
- https://git.kernel.org/stable/c/028363685bd0b7a19b4a820f82dd905b1dc83999
FAQ
Is CVE-2025-38097 being exploited?
There is no confirmed exploitation: CVE-2025-38097 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-38097?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-38097?
Linux >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e32bafd08ee35feacd47b05cc5bfe9cd9659cd25; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9673ca00e6c5503069dc98780e2e89db0e663c16; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e4cde54b46a87231c77256a633be1bef62687d69; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < b58a295d10065960bcb9d60cb8ca6ead9837cd27; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9cbca30102028f9ad3d2098f935c4368f581fd07; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 74fd327767fb784c5875cf7c4ba1217f26020943; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 028363685bd0b7a19b4a820f82dd905b1dc83999; Linux 5.6.
Is there a fix for CVE-2025-38097?
Yes. Fixed in Linux 9673ca00e6c5503069dc98780e2e89db0e663c16, Linux 9cbca30102028f9ad3d2098f935c4368f581fd07, Linux 74fd327767fb784c5875cf7c4ba1217f26020943, Linux 028363685bd0b7a19b4a820f82dd905b1dc83999. Upgrade Linux to 028363685bd0b7a19b4a820f82dd905b1dc83999 or later.
How do I check if I'm affected by CVE-2025-38097?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.