CVE-2025-38097
📋 TL;DR
A reference leak vulnerability in the Linux kernel's espintcp module prevents proper cleanup of network namespace references when deleting xfrm states. This can cause network namespaces to remain allocated after processes terminate, leading to resource exhaustion. Systems using IPsec ESP in TCP mode with Linux kernel networking are affected.
💻 Affected Systems
- Linux kernel
📦 What is this software?
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
Resource exhaustion leading to denial of service as orphaned network namespaces accumulate, potentially causing kernel instability or system crashes.
Likely Case
Gradual memory/resource leakage over time in systems that frequently create/destroy network namespaces with active IPsec connections.
If Mitigated
Minimal impact if systems don't use IPsec ESP in TCP mode or rarely modify network namespaces.
🎯 Exploit Status
Exploitation requires ability to create IPsec connections and manipulate network namespaces, typically requiring privileged access.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions containing commits 028363685bd0b7a19b4a820f82dd905b1dc83999 or later
Vendor Advisory: https://git.kernel.org/stable/c/028363685bd0b7a19b4a820f82dd905b1dc83999
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel. 3. Verify kernel version matches patched release.
🔧 Temporary Workarounds
Disable IPsec ESP over TCP
linuxAvoid using IPsec ESP in TCP mode to prevent triggering the vulnerability
# Remove or comment espintcp configurations from ipsec.conf
# Disable espintcp module if possible
Limit network namespace creation
linuxRestrict creation of new network namespaces to reduce exposure
# Set user namespace limits: echo 'user.max_user_namespaces=0' >> /etc/sysctl.conf
# sysctl -p
🧯 If You Can't Patch
- Monitor system memory and network namespace counts for abnormal growth
- Regularly restart systems or services using IPsec ESP over TCP to clear potential leaks
🔍 How to Verify
Check if Vulnerable:
Check kernel version and verify if espintcp module is loaded: 'lsmod | grep espintcp' and 'uname -r'
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commit: 'uname -r' and check with distribution vendor for patched versions
📡 Detection & Monitoring
Log Indicators:
- Kernel messages about network namespace reference counts
- System logs showing memory exhaustion over time
Network Indicators:
- Unusual persistence of network namespaces after process termination
SIEM Query:
source="kernel" AND ("network namespace" OR "reference leak" OR "espintcp")
🔗 References
- https://git.kernel.org/stable/c/028363685bd0b7a19b4a820f82dd905b1dc83999
- https://git.kernel.org/stable/c/74fd327767fb784c5875cf7c4ba1217f26020943
- https://git.kernel.org/stable/c/9cbca30102028f9ad3d2098f935c4368f581fd07
- https://git.kernel.org/stable/c/b58a295d10065960bcb9d60cb8ca6ead9837cd27
- https://git.kernel.org/stable/c/e4cde54b46a87231c77256a633be1bef62687d69
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html