CVE-2025-40256
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40256 is a memory leak (resource leak) vulnerability in the Linux kernel's XFRM (IPsec transform) subsystem, specifically in the handling of IPcomp tunnel state lifecycle management. The flaw was introduced by an incomplete fix in commit b441cf3f8c4b ("xfrm: delete x->tunnel as we delete x") that missed the case where state creation fails after ->init_state is called but before the state is inserted into the kernel's state lists. Affected Linux kernel versions span from commit b441cf3f8c4b up to (but not including) the fix commits; patched versions include kernel 6.17.10 and 6.18. It was published on December 4, 2025, with an estimated CVSS severity of Medium and an EPSS score of approximately 0.024% (Feedly, ENISA EUVD).

Technical details

The root cause is a resource management error (CWE-401: Missing Release of Memory after Effective Lifetime) in the Linux kernel's xfrm_state_gc_destroy function. When an IPcomp state's ->init_state callback is invoked, it creates a fallback (FB) tunnel and registers it on the kernel's XFRM state lists. If state creation subsequently fails before the user state is inserted into those lists, the user state bypasses __xfrm_state_delete, meaning xfrm_state_delete_tunnel is never called for it, and the FB tunnel is leaked. The fix ensures xfrm_state_delete_tunnel is also called during xfrm_state_gc_destroy for states that were never added to the lists, covering affected codepaths in net/key, xfrm add/update paths, and the migrate code (xfrm_migrate, xfrm_state_migrate) (Feedly, ENISA EUVD).

Impact

Successful triggering of this vulnerability results in a kernel memory leak — specifically, the fallback IPcomp tunnel state is never freed, gradually consuming kernel memory resources. Over time or under repeated triggering, this could degrade system performance or contribute to denial-of-service conditions due to resource exhaustion. There is no direct confidentiality or integrity impact; the primary risk is availability degradation on systems using IPcomp tunnels (Feedly).

Exploitability

There is no known public proof-of-concept exploit or evidence of in-the-wild exploitation for CVE-2025-40256. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.024%, reflecting a very low probability of exploitation in the near term (Feedly). Exploitation would require local access to a system with IPcomp tunnel configuration capabilities, significantly limiting the attack surface.

Mitigation and workarounds

The fix has been applied to the Linux kernel stable trees; patched versions include kernel 6.17.10 and 6.18 (ENISA EUVD). Downstream distributions including SUSE, Oracle Linux (versions 7, 8, and 9), and others have issued updated kernel packages incorporating this fix (Feedly). Administrators should update to the latest available kernel version for their distribution. No configuration-based workaround is available; upgrading is the recommended remediation.

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-74583NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-debug
NoYesAug 21, 2026
CVE-2026-74582NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel.src
NoYesAug 21, 2026
CVE-2026-74581NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-64k-modules-internal
NoYesAug 21, 2026
CVE-2026-74580NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-debug
NoYesAug 21, 2026
CVE-2025-30156NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-debug-devel-matched
NoYesAug 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management