CVE-2025-40215
xfrm: delete x->tunnel as we delete x
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 1b28a7fae0128fa140a7dccd995182ff6cd1c67b; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 4b2c17d0f9be8b58bb30468bc81a4b61c985b04e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 0da961fa46da1b37ef868d9b603bd202136f8f8e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < d0e0d1097118461463b76562c7ebaabaa5b90b13; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < dc3636912d41770466543623cb76e7b88fdb42c7; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < b441cf3f8c4b8576639d20c8eb4aa32917602ecd
- Anyone running Linux 2.6.29
Vulnerability facts
- Affected
- Linux >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 1b28a7fae0128fa140a7dccd995182ff6cd1c67b; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 4b2c17d0f9be8b58bb30468bc81a4b61c985b04e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 0da961fa46da1b37ef868d9b603bd202136f8f8e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < d0e0d1097118461463b76562c7ebaabaa5b90b13; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < dc3636912d41770466543623cb76e7b88fdb42c7; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < b441cf3f8c4b8576639d20c8eb4aa32917602ecd; Linux 2.6.29
- Fixed in
- Linux 1b28a7fae0128fa140a7dccd995182ff6cd1c67b, Linux 4b2c17d0f9be8b58bb30468bc81a4b61c985b04e, Linux 0da961fa46da1b37ef868d9b603bd202136f8f8e
- 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.23% chance of exploitation in 30 days (percentile 9, 2026-11-26)
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: xfrm: delete x->tunnel as we delete x The ipcomp fallback tunnels currently get deleted (from the various lists and hashtables) as the last user state that needed that fallback is destroyed (not deleted). If a reference to that user state still exists, the fallback state will remain on the hashtables/lists, triggering the WARN in xfrm_state_fini. Because of those remaining references, the fix in commit f75a2804da39 ("xfrm: destroy xfrm_state synchronously on net exit path") is not complete. We recently fixed one such situation in TCP due to defered freeing of skbs (commit 9b6412e6979f ("tcp: drop secpath at the same time as we currently drop dst")). This can also happen due to IP reassembly: skbs with a secpath remain on the reassembly queue until netns destruction. If we can't guarantee that the queues are flushed by the time xfrm_state_fini runs, there may still be references to a (user) xfrm_state, preventing the timely deletion of the corresponding fallback state. Instead of chasing each instance of skbs holding a secpath one by one, this patch fixes the issue directly within xfrm, by deleting the fallback state as soon as the last user state depending on it has been deleted. Destruction will still happen when the final reference is dropped. A separate lockdep class for the fallback state is required since we're going to lock x->tunnel while x is locked.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 1b28a7fae0128fa140a7dccd995182ff6cd1c67b; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 4b2c17d0f9be8b58bb30468bc81a4b61c985b04e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 0da961fa46da1b37ef868d9b603bd202136f8f8e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < d0e0d1097118461463b76562c7ebaabaa5b90b13; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < dc3636912d41770466543623cb76e7b88fdb42c7; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < b441cf3f8c4b8576639d20c8eb4aa32917602ecd | — | cvelist |
| Linux | 2.6.29 | — | 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-40215. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-40215.md Affected: Linux >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 1b28a7fae0128fa140a7dccd995182ff6cd1c67b; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 4b2c17d0f9be8b58bb30468bc81a4b61c985b04e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 0da961fa46da1b37ef868d9b603bd202136f8f8e; >= 9d4139c76905833afcb77fe… Fixed in: Linux 1b28a7fae0128fa140a7dccd995182ff6cd1c67b, Linux 4b2c17d0f9be8b58bb30468bc81a4b61c985b04e, Linux 0da961fa46da1b37ef868d9b603bd202136f8f8e 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
Other
- https://git.kernel.org/stable/c/1b28a7fae0128fa140a7dccd995182ff6cd1c67b
- https://git.kernel.org/stable/c/4b2c17d0f9be8b58bb30468bc81a4b61c985b04e
- https://git.kernel.org/stable/c/0da961fa46da1b37ef868d9b603bd202136f8f8e
- https://git.kernel.org/stable/c/d0e0d1097118461463b76562c7ebaabaa5b90b13
- https://git.kernel.org/stable/c/dc3636912d41770466543623cb76e7b88fdb42c7
- https://git.kernel.org/stable/c/b441cf3f8c4b8576639d20c8eb4aa32917602ecd
FAQ
Is CVE-2025-40215 being exploited?
There is no confirmed exploitation: CVE-2025-40215 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-40215?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-40215?
Linux >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 1b28a7fae0128fa140a7dccd995182ff6cd1c67b; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 4b2c17d0f9be8b58bb30468bc81a4b61c985b04e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < 0da961fa46da1b37ef868d9b603bd202136f8f8e; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < d0e0d1097118461463b76562c7ebaabaa5b90b13; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < dc3636912d41770466543623cb76e7b88fdb42c7; >= 9d4139c76905833afcb77fe8ccc17f302a0eb9ab, < b441cf3f8c4b8576639d20c8eb4aa32917602ecd; Linux 2.6.29.
Is there a fix for CVE-2025-40215?
Yes. Fixed in Linux 1b28a7fae0128fa140a7dccd995182ff6cd1c67b, Linux 4b2c17d0f9be8b58bb30468bc81a4b61c985b04e, Linux 0da961fa46da1b37ef868d9b603bd202136f8f8e. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2025-40215?
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.