cve.bz

CVE-2025-39797 linux linux kernel

7.8 highEPSS 0.2%Fix available

High (7.8) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 6th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-11-05. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-39797 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-39797?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-39797?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-39797 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux2.6.12 and later

Fixed in

ProductRelease lineFixed in
Linux6.16.1.191
Linux6.66.6.103
Linux6.126.12.43
Linux6.156.15.11
Linux6.166.16.2
Linuxlater releases6.17

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.192-1DEBIAN-CVE-2025-39797
Debian13linux6.12.43-1DEBIAN-CVE-2025-39797
Debian14linux6.16.3-1DEBIAN-CVE-2025-39797
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-39797
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-39797
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-39797
Ubuntu22.04:LTSlinux, linux-aws, linux-gcp and 47 moreno fix listedUBUNTU-CVE-2025-39797
Ubuntu22.04:LTSlinux-aws-6.8, linux-nvidia-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-39797 USN-8028-5
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-39797 USN-8126-1
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1046.53~22.04.1UBUNTU-CVE-2025-39797
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1047.50~22.04.2UBUNTU-CVE-2025-39797 USN-8031-1
Ubuntu22.04:LTSlinux-hwe-6.8, linux-riscv-6.86.8.0-100.100~22.04.1UBUNTU-CVE-2025-39797 USN-8028-6
Ubuntu22.04:LTSlinux-ibm-6.86.8.0-1044.44~22.04.1UBUNTU-CVE-2025-39797 USN-8028-8
Ubuntu22.04:LTSlinux-lowlatency-hwe-6.86.8.0-100.100.1~22.04.1UBUNTU-CVE-2025-39797 USN-8028-6
Ubuntu22.04:LTSlinux-oracle-6.86.8.0-1043.44~22.04.1UBUNTU-CVE-2025-39797 USN-8028-5
34 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:9::appstreamrv, perf, rtla and 29 more0:5.14.0-687.31.1.el9_8RHSA-2026:47040
Red Hatenterprise_linux:9::baseoskernel, kernel-64k, kernel-core and 45 more0:5.14.0-687.31.1.el9_8RHSA-2026:47040
Red Hatenterprise_linux:9::crblibperf, perf-debuginfo, kernel-debuginfo and 16 more0:5.14.0-687.31.1.el9_8RHSA-2026:47040
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-core, perf-debuginfo and 18 more0:5.14.0-687.31.1.el9_8RHSA-2026:47040
Red Hatenterprise_linux:9::realtimekernel-rt, kernel-rt-64k, kernel-rt-core and 35 more0:5.14.0-687.31.1.el9_8RHSA-2026:47040
Red Hatenterprise_linux:10.2rv, perf, rtla and 87 more0:6.12.0-211.7.1.el10_2RHSA-2026:18134
Red Hatenterprise_linux_eus:10.0rv, perf, rtla and 88 more0:6.12.0-55.117.1.el10_0RHSA-2026:94508
Red Hatrhel_e4s:9.4::appstreamrv, perf, rtla and 26 more0:5.14.0-427.158.1.el9_4RHSA-2026:91489
Red Hatrhel_e4s:9.4::appstream, rhel_e4s:9.4::nfv, rhel_e4s:9.4::realtimebpftool-debuginfo0:7.3.0-427.158.1.el9_4RHSA-2026:91489
Red Hatrhel_e4s:9.4::baseosbpftool, bpftool-debuginfo0:7.3.0-427.158.1.el9_4RHSA-2026:91489
Red Hatrhel_e4s:9.4::baseoskernel, kernel-64k, kernel-core and 43 more0:5.14.0-427.158.1.el9_4RHSA-2026:91489
Red Hatrhel_e4s:9.4::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 20 more0:5.14.0-427.158.1.el9_4RHSA-2026:91489
6 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Availability Extension 15 SP4, Linux Enterprise Live Patching 15 SP4, Linux Enterprise Micro 5.3 and 1 morekernel-default5.14.21-150400.24.179.1SUSE-SU-2025:03628-1
SUSELinux Enterprise High Availability Extension 15 SP4, Linux Enterprise Live Patching 15 SP4, Linux Enterprise Micro 5.3 and 1 morekernel-default5.14.21-150400.24.184.1SUSE-SU-2025:4111-1
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.73.1SUSE-SU-2025:03600-1
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.78.1SUSE-SU-2025:4140-1
SUSELinux Enterprise High Availability Extension 15 SP7, Linux Enterprise Live Patching 15 SP7, Linux Enterprise Module for Legacy 15 SP7 and 1 morekernel-default6.4.0-150700.53.19.1SUSE-SU-2025:03601-1
SUSELinux Enterprise High Availability Extension 15 SP7, Linux Enterprise Live Patching 15 SP7, Linux Enterprise Module for Legacy 15 SP7 and 1 morekernel-default6.4.0-150700.53.22.1SUSE-SU-2025:4057-1
SUSELinux Enterprise High Availability Extension 16.0kernel-default6.12.0-160000.6.1SUSE-SU-2025:21179-1
SUSELinux Enterprise High Availability Extension 16.0kernel-default6.12.0-160000.7.1SUSE-SU-2025:21180-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSSkernel-64kb, kernel-docs, kernel-syms and 3 more5.14.21-150400.24.179.1SUSE-SU-2025:03628-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSSkernel-64kb, kernel-docs, kernel-syms and 3 more5.14.21-150400.24.184.1SUSE-SU-2025:4111-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Micro 5.3 and 5 morekernel-default-base5.14.21-150400.24.179.1.150400.24.92.1SUSE-SU-2025:03628-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Micro 5.3 and 5 morekernel-default-base5.14.21-150400.24.184.1.150400.24.94.2SUSE-SU-2025:4111-1
69 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6dtb-aarch64, kernel-64kb, kernel-docs and 8 more6.4.0-150600.23.73.1SUSE-SU-2025:03600-1
openSUSELeap 15.6dtb-aarch64, kernel-64kb, kernel-docs and 8 more6.4.0-150600.23.78.1SUSE-SU-2025:4140-1
openSUSELeap 15.6kernel-azure, kernel-syms-azure, kernel-source-azure6.4.0-150600.8.52.1SUSE-SU-2025:03634-1
openSUSELeap 15.6kernel-azure, kernel-syms-azure, kernel-source-azure6.4.0-150600.8.55.1SUSE-SU-2025:4128-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.73.1.150600.12.32.1SUSE-SU-2025:03600-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.78.1.150600.12.34.2SUSE-SU-2025:4140-1
openSUSELeap 15.6kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more6.4.0-150600.10.55.1SUSE-SU-2025:3751-1
openSUSELeap 15.6kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more6.4.0-150600.10.58.1SUSE-SU-2025:4301-1
openSUSELeap 16.0kernel-default-base6.12.0-160000.6.1.160000.2.4openSUSE-SU-2025:20081-1 openSUSE-SU-2025:20091-1
openSUSELeap 16.0kernel-rt, dtb-aarch64, kernel-64kb and 8 more6.12.0-160000.6.1openSUSE-SU-2025:20081-1
openSUSELeap 16.0kernel-rt, dtb-aarch64, kernel-64kb and 8 more6.12.0-160000.7.1openSUSE-SU-2025:20091-1
AlmaLinux9rv, perf, rtla and 71 more5.14.0-687.31.1.el9_8ALSA-2026:47040
AlmaLinux10rv, perf, rtla and 72 more6.12.0-211.7.1.el10_2ALSA-2026:18134
Rocky Linux9kernel0:5.14.0-687.31.1.el9_8RLSA-2026:47040
Azure Linux2kernelno fix listedAZL-70760
Azure Linux3kernel6.6.104.2-1AZL-67334
Alpaquita23linux-lts6.1.191-r0BELL-CVE-2025-39797
Alpaquita25linux-lts6.12.44-r0BELL-CVE-2025-39797
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-39797

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The patch fixes a logic flaw in XFRM SPI allocation where xfrm_alloc_spi() could succeed even if the requested SPI was already in use on another inbound SA (different dst). That lets multiple inbound SAs share the same SPI+proto, so inbound lookups may hit the “wrong” SA or none at all, causing IPsec packet drops (DoS). It’s reliably reproducible by constraining the SPI range (e.g., 0x10000000–0x10000002) and creating more Child SAs than available SPIs. The main risk is remote DoS.

Triggering this issue requires interaction at the IKE/IPsec control plane — it can only be exercised when an IKE daemon (for example strongSwan, LibreSwan, racoon or OpenSwan) is present and issues XFRM (netlink) requests to create SAs.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernel-0:6.12.0-211.7.1.el10_2Fixed 2026-05-19RHSA-2026:18134
Red Hat Enterprise Linux 10.0 Extended Update Supportkernel-0:6.12.0-55.117.1.el10_0Fixed 2026-11-03RHSA-2026:94508
Red Hat Enterprise Linux 9kernel-0:5.14.0-687.31.1.el9_8Fixed 2026-07-28RHSA-2026:47040
Red Hat Enterprise Linux 9.4 Update Services for SAP Solutionskernel-0:5.14.0-427.158.1.el9_4Fixed 2026-10-28RHSA-2026:91489
Red Hat Enterprise Linux 9.6 Extended Update Supportkernel-0:5.14.0-570.152.1.el9_6Fixed 2026-10-28RHSA-2026:91492
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelFix deferred
Red Hat Enterprise Linux 7kernel-rtFix deferred
Red Hat Enterprise Linux 8kernelFix deferred
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-39797.

References

Check your stackJSON