Junglewise Threat Intelligence

CVE-2025-40215: Linux Kernel resource leak in XFRM IPcomp tunnel cleanup

CVE-2025-40215 · Severity: high · CVSS 7.8 · Published 2025-12-04

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability was identified in the Linux kernel's networking subsystem, specifically within the component responsible for IPsec (XFRM) and IP compression. Under certain conditions, such as during network namespace destruction or high volumes of fragmented traffic, the system may fail to properly clean up internal tunnel states. This can lead to system instability or potentially allow a local user to cause a denial of service or gain unauthorized access to system resources.

Technical details

A vulnerability exists in the Linux kernel XFRM state management where ipcomp fallback tunnels are not deleted until the associated user state is destroyed, rather than when it is deleted. Because references to xfrm_state can be held by skbs in TCP deferred freeing paths or IP reassembly queues, the fallback state can persist in hashtables/lists after netns destruction, triggering warnings in xfrm_state_fini. This is a race condition/resource leak issue where the fix involves explicitly deleting the fallback state (x->tunnel) during the state deletion phase rather than waiting for the final reference drop. The vulnerability affects the XFRM framework and IPcomp implementations in both IPv4 and IPv6. Patches have been released across multiple stable kernel branches to ensure synchronous deletion of tunnel states.

Affected products

  • Linux Linux Kernel 2.6.29 to 6.13

Timeline

  • 2025-12-04: advisory: CVE-2025-40215 published
  • 2026-01-11: patched: Fix committed to stable kernel trees

References

Related threats