CVE-2025-39797 json
xfrm: Duplicate SPI Handling
published 2025-09-12 13 mo ago modified 2026-11-05 3 d ago also EUVD-2025-29057
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 5%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
xfrm: Duplicate SPI Handling
The issue originates when Strongswan initiates an XFRM_MSG_ALLOCSPI Netlink message, which triggers the kernel function xfrm_alloc_spi(). This function is expected to ensure uniqueness of the Security Parameter Index (SPI) for inbound Security Associations (SAs). However, it can return success even when the requested SPI is already in use, leading to duplicate SPIs assigned to multiple inbound SAs, differentiated only by their destination addresses.
This behavior causes inconsistencies during SPI lookups for inbound packets. Since the lookup may return an arbitrary SA among those with the same SPI, packet processing can fail, resulting in packet drops.
According to RFC 4301 section 4.4.2 , for inbound processing a unicast SA is uniquely identified by the SPI and optionally protocol.
Reproducing the Issue Reliably: To consistently reproduce the problem, restrict the available SPI range in charon.conf : spi_min = 0x10000000 spi_max = 0x10000002 This limits the system to only 2 usable SPI values. Next, create more than 2 Child SA. each using unique pair of src/dst address. As soon as the 3rd Child SA is initiated, it will be assigned a duplicate SPI, since the SPI pool is already exhausted. With a narrow SPI range, the issue is consistently reproducible. With a broader/default range, it becomes rare and unpredictable.
Current implementation: xfrm_spi_hash() lookup function computes hash using daddr, proto, and family. So if two SAs have the same SPI but different destination addresses, then they will: a. Hash into different buckets b. Be stored in different linked lists (byspi + h) c. Not be seen in the same hlist_for_each_entry_rcu() iteration. As a result, the lookup will result in NULL and kernel allows that Duplicate SPI
Proposed Change: xfrm_state_lookup_spi_proto() does a truly global search - across all states, regardless of hash bucket and matches SPI and proto.
Patch / fix
- Linux Linux 6.1.191, 6.6.103, 6.12.43, 6.15.11, 6.16.2, 6.17
- linux Debian 13 6.12.43-1
- linux Debian 14 6.16.3-1
debian advisories DEBIAN-CVE-2025-39797
- linux Ubuntu 24.04 LTS 6.8.0-100.100
- linux-aws Ubuntu 24.04 LTS 6.8.0-1046.49
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1047.50
- linux-gke Ubuntu 24.04 LTS 6.8.0-1043.48
- linux-ibm Ubuntu 24.04 LTS 6.8.0-1044.44
- linux-azure Ubuntu 24.04 LTS 6.8.0-1046.52
- linux-gkeop Ubuntu 24.04 LTS 6.8.0-1030.33
- linux-raspi Ubuntu 24.04 LTS 6.8.0-1047.51
ubuntu advisories UBUNTU-CVE-2025-39797
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 RHEL 9 5.14.0-687.31.1.el9_8
- rv RHEL 9 5.14.0-687.31.1.el9_8
- perf RHEL 9 5.14.0-687.31.1.el9_8
- rtla RHEL 9 5.14.0-687.31.1.el9_8
- libperf RHEL 9 5.14.0-687.31.1.el9_8
- kernel-rt RHEL 9 5.14.0-687.31.1.el9_8
- kernel-64k RHEL 9 5.14.0-687.31.1.el9_8
- kernel-core RHEL 9 5.14.0-687.31.1.el9_8
red hat advisories RHSA-2026:47040RHSA-2026:18134
- kernel-64kb SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS, SLE High Performance Computing 15 SP5-ESPOS 5.14.21-150500.55.127.1
- kernel-syms SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS +1 more 5.14.21-150500.55.127.1
- kernel-source SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +2 more 5.14.21-150500.55.127.1
- kernel-default SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +3 more 5.14.21-150500.55.127.1
- kernel-obs-build SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS +1 more 5.14.21-150500.55.127.1
- kernel-default-base SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +2 more 5.14.21-150500.55.127.1.150500.6.61.1
- kernel-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.58.1
- kernel-syms-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.58.1
suse advisories SUSE-SU-2025:4320-1SUSE-SU-2025:4301-1SUSE-SU-2025:21080-1SUSE-SU-2025:21147-1SUSE-SU-2025:21180-1SUSE-SU-2026:20561-1
- kernel-rt openSUSE Leap 16.0 6.12.0-160000.7.1
- dtb-aarch64 openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-64kb openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-syms openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-obs-qa openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-source openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-default openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-kvmsmall openSUSE Leap 16.0 6.12.0-160000.7.1
opensuse advisories openSUSE-SU-2025:20091-1openSUSE-SU-2025:20081-1
- kernel AlmaLinux 9 5.14.0-687.31.1.el9_8
- rv AlmaLinux 9 5.14.0-687.31.1.el9_8
- perf AlmaLinux 9 5.14.0-687.31.1.el9_8
- rtla AlmaLinux 9 5.14.0-687.31.1.el9_8
- libperf AlmaLinux 9 5.14.0-687.31.1.el9_8
- kernel-rt AlmaLinux 9 5.14.0-687.31.1.el9_8
- kernel-64k AlmaLinux 9 5.14.0-687.31.1.el9_8
- kernel-core AlmaLinux 9 5.14.0-687.31.1.el9_8
almalinux advisories ALSA-2026:47040ALSA-2026:18134
- kernel Rocky Linux 9 5.14.0-687.31.1.el9_8
rocky linux advisories RLSA-2026:47040
- git.kernel.org/stable/c/fb58962aa3b9359988c7b5b15a971fd9ad5b0ecd commit
- git.kernel.org/stable/c/3d8090bb53424432fa788fe9a49e8ceca74f0544 commit
- git.kernel.org/stable/c/2fc5b54368a1bf1d2d74b4d3b8eea5309a653e38 commit
- git.kernel.org/stable/c/c67d4e7a8f90fb6361ca89d4d5c9a28f4e935e47 commit
- git.kernel.org/stable/c/29e9158f91f99057dbd35db5e8674d93b38549fe commit
- git.kernel.org/stable/c/94f39804d891cffe4ce17737d295f3b195bc7299 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-39797 updated cvss 5.3
kernel: xfrm: Duplicate SPI Handling
-
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 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 moreaffected: no fix available “Fix deferred”
-
Red Hat CodeReady Linux Builder EUS (v.9.6) libperf 5.14.0-570.152.1.el9_6, kernel-debuginfo-common-s390x 5.14.0-570.152.1.el9_6, kernel-debuginfo-common-x86_64 5.14.0-570.152.1.el9_6, kernel-debuginfo-common-aarch64 5.14.0-570.152.1.el9_6, kernel-debuginfo-common-ppc64le 5.14.0-570.152.1.el9_6fixed: vendor fix RHSA-2026:91492
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-687.31.1.el9_8, perf 5.14.0-687.31.1.el9_8, rtla 5.14.0-687.31.1.el9_8, python3-perf 5.14.0-687.31.1.el9_8, kernel-devel-matched 5.14.0-687.31.1.el9_8, kernel-64k-devel-matched 5.14.0-687.31.1.el9_8, +7 morefixed: vendor fix RHSA-2026:47040
-
Red Hat Enterprise Linux AppStream (v. 10) rv 6.12.0-211.7.1.el10_2, perf 6.12.0-211.7.1.el10_2, rtla 6.12.0-211.7.1.el10_2, python3-perf 6.12.0-211.7.1.el10_2, kernel-devel-matched 6.12.0-211.7.1.el10_2, kernel-64k-devel-matched 6.12.0-211.7.1.el10_2, +7 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux AppStream E4S (v.9.4) rv 5.14.0-427.158.1.el9_4, perf 5.14.0-427.158.1.el9_4, rtla 5.14.0-427.158.1.el9_4, kernel-devel-matched 5.14.0-427.158.1.el9_4, kernel-64k-devel-matched 5.14.0-427.158.1.el9_4, kernel-debug-devel-matched 5.14.0-427.158.1.el9_4, +6 morefixed: vendor fix RHSA-2026:91489
-
Red Hat Enterprise Linux AppStream EUS (v. 10.0) rv 6.12.0-55.117.1.el10_0, perf 6.12.0-55.117.1.el10_0, rtla 6.12.0-55.117.1.el10_0, python3-perf 6.12.0-55.117.1.el10_0, kernel-devel-matched 6.12.0-55.117.1.el10_0, kernel-64k-devel-matched 6.12.0-55.117.1.el10_0, +7 morefixed: vendor fix RHSA-2026:94508
-
Red Hat Enterprise Linux AppStream EUS (v.9.6) rv 5.14.0-570.152.1.el9_6, perf 5.14.0-570.152.1.el9_6, rtla 5.14.0-570.152.1.el9_6, python3-perf 5.14.0-570.152.1.el9_6, kernel-devel-matched 5.14.0-570.152.1.el9_6, kernel-64k-devel-matched 5.14.0-570.152.1.el9_6, +7 morefixed: vendor fix RHSA-2026:91492
show 18 moreshow fewer
-
Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-687.31.1.el9_8, kernel-64k 5.14.0-687.31.1.el9_8, kernel-core 5.14.0-687.31.1.el9_8, kernel-tools 5.14.0-687.31.1.el9_8, kernel-modules 5.14.0-687.31.1.el9_8, kernel-64k-core 5.14.0-687.31.1.el9_8, +27 morefixed: vendor fix RHSA-2026:47040
-
Red Hat Enterprise Linux BaseOS (v. 10) kernel 6.12.0-211.7.1.el10_2, kernel-64k 6.12.0-211.7.1.el10_2, kernel-core 6.12.0-211.7.1.el10_2, kernel-tools 6.12.0-211.7.1.el10_2, kernel-modules 6.12.0-211.7.1.el10_2, kernel-64k-core 6.12.0-211.7.1.el10_2, +28 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux BaseOS E4S (v.9.4) bpftool 7.3.0-427.158.1.el9_4, kernel 5.14.0-427.158.1.el9_4, kernel-64k 5.14.0-427.158.1.el9_4, kernel-core 5.14.0-427.158.1.el9_4, kernel-tools 5.14.0-427.158.1.el9_4, python3-perf 5.14.0-427.158.1.el9_4, +28 morefixed: vendor fix RHSA-2026:91489
-
Red Hat Enterprise Linux BaseOS EUS (v. 10.0) kernel 6.12.0-55.117.1.el10_0, kernel-64k 6.12.0-55.117.1.el10_0, kernel-core 6.12.0-55.117.1.el10_0, kernel-tools 6.12.0-55.117.1.el10_0, kernel-modules 6.12.0-55.117.1.el10_0, kernel-64k-core 6.12.0-55.117.1.el10_0, +27 morefixed: vendor fix RHSA-2026:94508
-
Red Hat Enterprise Linux BaseOS EUS (v.9.6) kernel 5.14.0-570.152.1.el9_6, kernel-64k 5.14.0-570.152.1.el9_6, kernel-core 5.14.0-570.152.1.el9_6, kernel-tools 5.14.0-570.152.1.el9_6, kernel-modules 5.14.0-570.152.1.el9_6, kernel-64k-core 5.14.0-570.152.1.el9_6, +27 morefixed: vendor fix RHSA-2026:91492
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) libperf 5.14.0-687.31.1.el9_8, kernel-debuginfo-common-s390x 5.14.0-687.31.1.el9_8, kernel-debuginfo-common-x86_64 5.14.0-687.31.1.el9_8, kernel-debuginfo-common-aarch64 5.14.0-687.31.1.el9_8, kernel-debuginfo-common-ppc64le 5.14.0-687.31.1.el9_8fixed: vendor fix RHSA-2026:47040
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) libperf 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-s390x 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-x86_64 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-aarch64 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-ppc64le 6.12.0-211.7.1.el10_2fixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0) libperf 6.12.0-55.117.1.el10_0, kernel-debuginfo-common-s390x 6.12.0-55.117.1.el10_0, kernel-debuginfo-common-x86_64 6.12.0-55.117.1.el10_0, kernel-debuginfo-common-aarch64 6.12.0-55.117.1.el10_0, kernel-debuginfo-common-ppc64le 6.12.0-55.117.1.el10_0fixed: vendor fix RHSA-2026:94508
-
Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-687.31.1.el9_8, kernel-rt-64k 5.14.0-687.31.1.el9_8, kernel-rt-core 5.14.0-687.31.1.el9_8, kernel-rt-modules 5.14.0-687.31.1.el9_8, kernel-rt-64k-core 5.14.0-687.31.1.el9_8, kernel-rt-debug-core 5.14.0-687.31.1.el9_8, +14 morefixed: vendor fix RHSA-2026:47040
-
Red Hat Enterprise Linux Real Time (v. 10) kernel-rt 6.12.0-211.7.1.el10_2, kernel-rt-64k 6.12.0-211.7.1.el10_2, kernel-rt-core 6.12.0-211.7.1.el10_2, kernel-rt-modules 6.12.0-211.7.1.el10_2, kernel-rt-64k-core 6.12.0-211.7.1.el10_2, kernel-rt-debug-core 6.12.0-211.7.1.el10_2, +14 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux Real Time E4S (v.9.4) kernel-rt 5.14.0-427.158.1.el9_4, kernel-rt-core 5.14.0-427.158.1.el9_4, kernel-rt-modules 5.14.0-427.158.1.el9_4, kernel-rt-debug-core 5.14.0-427.158.1.el9_4, kernel-rt-modules-core 5.14.0-427.158.1.el9_4, kernel-rt-debug-modules 5.14.0-427.158.1.el9_4, +4 morefixed: vendor fix RHSA-2026:91489
-
Red Hat Enterprise Linux Real Time EUS (v. 10.0) kernel-rt 6.12.0-55.117.1.el10_0, kernel-rt-64k 6.12.0-55.117.1.el10_0, kernel-rt-core 6.12.0-55.117.1.el10_0, kernel-rt-modules 6.12.0-55.117.1.el10_0, kernel-rt-64k-core 6.12.0-55.117.1.el10_0, kernel-rt-debug-core 6.12.0-55.117.1.el10_0, +14 morefixed: vendor fix RHSA-2026:94508
-
Red Hat Enterprise Linux Real Time EUS (v.9.6) kernel-rt 5.14.0-570.152.1.el9_6, kernel-rt-64k 5.14.0-570.152.1.el9_6, kernel-rt-core 5.14.0-570.152.1.el9_6, kernel-rt-modules 5.14.0-570.152.1.el9_6, kernel-rt-64k-core 5.14.0-570.152.1.el9_6, kernel-rt-debug-core 5.14.0-570.152.1.el9_6, +14 morefixed: vendor fix RHSA-2026:91492
-
Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-687.31.1.el9_8, kernel-rt-core 5.14.0-687.31.1.el9_8, kernel-rt-modules 5.14.0-687.31.1.el9_8, kernel-rt-debug-core 5.14.0-687.31.1.el9_8, kernel-rt-modules-core 5.14.0-687.31.1.el9_8, kernel-rt-debug-modules 5.14.0-687.31.1.el9_8, +4 morefixed: vendor fix RHSA-2026:47040
-
Red Hat Enterprise Linux Real Time for NFV (v. 10) kernel-rt 6.12.0-211.7.1.el10_2, kernel-rt-core 6.12.0-211.7.1.el10_2, kernel-rt-modules 6.12.0-211.7.1.el10_2, kernel-rt-debug-core 6.12.0-211.7.1.el10_2, kernel-rt-modules-core 6.12.0-211.7.1.el10_2, kernel-rt-debug-modules 6.12.0-211.7.1.el10_2, +4 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux Real Time for NFV E4S (v.9.4) kernel-rt 5.14.0-427.158.1.el9_4, kernel-rt-kvm 5.14.0-427.158.1.el9_4, kernel-rt-core 5.14.0-427.158.1.el9_4, kernel-rt-modules 5.14.0-427.158.1.el9_4, kernel-rt-debug-kvm 5.14.0-427.158.1.el9_4, kernel-rt-debug-core 5.14.0-427.158.1.el9_4, +6 morefixed: vendor fix RHSA-2026:91489
-
Red Hat Enterprise Linux Real Time for NFV EUS (v. 10.0) kernel-rt 6.12.0-55.117.1.el10_0, kernel-rt-kvm 6.12.0-55.117.1.el10_0, kernel-rt-core 6.12.0-55.117.1.el10_0, kernel-rt-modules 6.12.0-55.117.1.el10_0, kernel-rt-debug-kvm 6.12.0-55.117.1.el10_0, kernel-rt-debug-core 6.12.0-55.117.1.el10_0, +6 morefixed: vendor fix RHSA-2026:94508
-
Red Hat Enterprise Linux Real Time for NFV EUS (v.9.6) kernel-rt 5.14.0-570.152.1.el9_6, kernel-rt-kvm 5.14.0-570.152.1.el9_6, kernel-rt-core 5.14.0-570.152.1.el9_6, kernel-rt-modules 5.14.0-570.152.1.el9_6, kernel-rt-debug-kvm 5.14.0-570.152.1.el9_6, kernel-rt-debug-core 5.14.0-570.152.1.el9_6, +6 morefixed: vendor fix RHSA-2026:91492
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
- 3 d ago
Exploit prediction
0.16% chance of exploitation in the next 30 days, higher than 5% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 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/fb58962aa3b9359988c7b5b15a971fd9ad5b0ecd
-
git.kernel.org
/stable/c/3d8090bb53424432fa788fe9a49e8ceca74f0544
patch
-
git.kernel.org
/stable/c/2fc5b54368a1bf1d2d74b4d3b8eea5309a653e38
patch
-
git.kernel.org
/stable/c/c67d4e7a8f90fb6361ca89d4d5c9a28f4e935e47
patch
-
git.kernel.org
/stable/c/29e9158f91f99057dbd35db5e8674d93b38549fe
patch
-
git.kernel.org
/stable/c/94f39804d891cffe4ce17737d295f3b195bc7299
patch
Sources
- CVE List CVE-2025-39797
- NVD CVE-2025-39797
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.