Menu

Star on GitHub · 3.2k

CVE-2025-40256

In the Linux kernel, the following vulnerability has been resolved: xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added In commit b441cf3f8c4b ("xfrm: delete…

Published Dec 4, 2025EPSS 0.21%

Overview

CVE-2025-40256 is a known-severity vulnerability. It was published on December 4, 2025.

Technical description

In the Linux kernel, the following vulnerability has been resolved:

xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added

In commit b441cf3f8c4b ("xfrm: delete x->tunnel as we delete x"), I

missed the case where state creation fails between full

initialization (->init_state has been called) and being inserted on

the lists.

In this situation, ->init_state has been called, so for IPcomp

tunnels, the fallback tunnel has been created and added onto the

lists, but the user state never gets added, because we fail before

that. The user state doesn't go through __xfrm_state_delete, so we

don't call xfrm_state_delete_tunnel for those states, and we end up

leaking the FB tunnel.

There are several codepaths affected by this: the add/update paths, in

both net/key and xfrm, and the migrate code (xfrm_migrate,

xfrm_state_migrate). A "proper" rollback of the init_state work would

probably be doable in the add/update code, but for migrate it gets

more complicate

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2025-40256?

CVE-2025-40256 is a known-severity vulnerability. It was published on December 4, 2025.

How severe is CVE-2025-40256?

CVSS score information is not yet available for this vulnerability. Check back as the CVE record is updated by NVD analysts.

How do I fix or remediate CVE-2025-40256?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2025-40256?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2025-40256 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.