CVE-2025-40215 json
xfrm: delete x->tunnel as we delete x
published 2025-12-04 11 mo ago modified 2026-10-19 20 d ago also EUVD-2025-201157
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 4%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 5.10.248, 5.15.198, 6.1.160, 6.6.120, 6.12.62, 6.16
- linux Debian 12 6.1.162-1
- linux Debian 13 6.12.63-1
- linux Debian 14 6.16.3-1
debian advisories DEBIAN-CVE-2025-40215
- linux Ubuntu 22.04 LTS 5.15.0-170.180
- linux Ubuntu 24.04 LTS 6.8.0-100.100
- linux-aws Ubuntu 22.04 LTS 5.15.0-1100.107
- linux-aws Ubuntu 24.04 LTS 6.8.0-1046.49
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1100.109
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1047.50
- linux-gke Ubuntu 22.04 LTS 5.15.0-1096.102
- linux-gke Ubuntu 24.04 LTS 6.8.0-1043.48
ubuntu advisories UBUNTU-CVE-2025-40215
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-rt Linux Micro 6.1, Linux Micro 6.0 6.4.0-40.1
- kernel-source-rt Linux Micro 6.1, Linux Micro 6.0 6.4.0-40.1
- kernel-64kb SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS, SLE High Performance Computing 15 SP4-ESPOS 5.14.21-150400.24.194.1
- kernel-syms SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +1 more 5.14.21-150400.24.194.1
- kernel-source SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +1 more 5.14.21-150400.24.194.1
- kernel-default SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Micro 5.4 +5 more 5.14.21-150400.24.194.1
- kernel-obs-build SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +1 more 5.14.21-150400.24.194.1
- kernel-default-base SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Micro 5.4 +3 more 5.14.21-150400.24.194.1.150400.24.98.3
suse advisories SUSE-SU-2026:20845-1SUSE-SU-2026:20876-1SUSE-SU-2026:0617-1SUSE-SU-2026:20477-1SUSE-SU-2026:20498-1SUSE-SU-2026:0411-1
- kernel-rt openSUSE Leap 16.0 6.12.0-160000.9.1
- dtb-aarch64 openSUSE Leap 16.0 6.12.0-160000.9.1
- kernel-64kb openSUSE Leap 16.0 6.12.0-160000.9.1
- kernel-syms openSUSE Leap 16.0 6.12.0-160000.9.1
- kernel-azure openSUSE Leap 16.0 6.12.0-160000.9.1
- kernel-obs-qa openSUSE Leap 16.0 6.12.0-160000.9.1
- kernel-source openSUSE Leap 16.0 6.12.0-160000.9.1
- kernel-default openSUSE Leap 16.0 6.12.0-160000.9.1
opensuse advisories openSUSE-SU-2026:20145-1
- git.kernel.org/stable/c/1b28a7fae0128fa140a7dccd995182ff6cd1c67b commit
- git.kernel.org/stable/c/4b2c17d0f9be8b58bb30468bc81a4b61c985b04e commit
- git.kernel.org/stable/c/0da961fa46da1b37ef868d9b603bd202136f8f8e commit
- git.kernel.org/stable/c/d0e0d1097118461463b76562c7ebaabaa5b90b13 commit
- git.kernel.org/stable/c/dc3636912d41770466543623cb76e7b88fdb42c7 commit
- git.kernel.org/stable/c/b441cf3f8c4b8576639d20c8eb4aa32917602ecd commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-40215 updated cvss 4.7
kernel: xfrm: delete x->tunnel as we delete x
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelaffected: no fix available “Fix deferred”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 4 mo ago
Exploit prediction
0.15% chance of exploitation in the next 30 days, higher than 4% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Technology feeds
References
- git.kernel.org /stable/c/1b28a7fae0128fa140a7dccd995182ff6cd1c67b
- git.kernel.org /stable/c/4b2c17d0f9be8b58bb30468bc81a4b61c985b04e
- git.kernel.org /stable/c/0da961fa46da1b37ef868d9b603bd202136f8f8e
- git.kernel.org /stable/c/d0e0d1097118461463b76562c7ebaabaa5b90b13
- git.kernel.org /stable/c/dc3636912d41770466543623cb76e7b88fdb42c7
- git.kernel.org /stable/c/b441cf3f8c4b8576639d20c8eb4aa32917602ecd
Sources
- CVE List CVE-2025-40215
- NVD CVE-2025-40215
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.