Skip to main content

Linux Kernel CVE-2025-39965

MEDIUM
2025-10-13 416baaa9-dc9f-4396-8d5f-8c081fb06d67
5.5
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
vuln.today AI
5.5 MEDIUM

Local low-privilege access required to trigger xfrm path; only kernel crash possible - no confidentiality or integrity impact confirmed.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE
6.6 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Red Hat
5.5 MEDIUM
qualitative

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Analysis Generated
Jul 30, 2026 - 08:44 vuln.today
CVE Published
Oct 13, 2025 - 14:15 nvd
MEDIUM 5.5

DescriptionNVD

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

xfrm: xfrm_alloc_spi shouldn't use 0 as SPI

x->id.spi == 0 means "no SPI assigned", but since commit 94f39804d891 ("xfrm: Duplicate SPI Handling"), we now create states and add them to the byspi list with this value.

__xfrm_state_delete doesn't remove those states from the byspi list, since they shouldn't be there, and this shows up as a UAF the next time we go through the byspi list.

AnalysisAI

Use-after-free in the Linux kernel xfrm subsystem allows a local low-privileged user to crash the kernel via improper SPI=0 handling introduced by commit 94f39804d891. The regression causes xfrm_alloc_spi to insert states with SPI value 0 (the sentinel for 'no SPI assigned') into the byspi hash table, while __xfrm_state_delete skips cleanup of those entries on deletion, leaving dangling pointers that produce a UAF on next byspi traversal. No public exploit code exists and EPSS probability is 0.17% (7th percentile), indicating no active exploitation pressure.

Technical ContextAI

The Linux kernel xfrm subsystem implements IPsec transforms and security associations (SAs), each identified by a Security Parameter Index (SPI). By convention, SPI=0 is a sentinel meaning 'no SPI assigned yet.' Commit 94f39804d891 ('xfrm: Duplicate SPI Handling') introduced a regression in xfrm_alloc_spi that creates states with SPI=0 and inserts them into the byspi hash table - a structure keyed on SPI values. The cleanup path __xfrm_state_delete explicitly avoids removing SPI=0 entries from byspi, predicated on the assumption that no such entries should exist there. This mismatch leaves freed state objects reachable through the byspi list, a classic use-after-free condition. The CWE is not formally assigned in the input, but the described behavior maps to CWE-416 (Use After Free). Affected CPE cpe:2.3:o:linux:linux_kernel covers multiple stable branches plus explicitly named pre-release builds 6.17-rc1 through 6.17-rc6.

RemediationAI

Apply the four upstream stable kernel patch commits available at git.kernel.org: 0baf92d0b1590b903c1f4ead75e61715e50e8146, 9fcedabaae0096f712bbb4ccca6a8538af1cd1c8, a78e55776522373c446f18d5002a8de4b09e6bf7, and cd8ae32e4e4652db55bce6b9c79267d8946765a9. These patches correct xfrm_alloc_spi to prevent zero-SPI states from being inserted into the byspi hash table. Users on distribution-packaged kernels (RHEL, Ubuntu, Debian, SUSE) should apply the next available kernel security update for their series. As a compensating control where immediate patching is not feasible, restrict unprivileged access to xfrm/IPsec configuration by enforcing CAP_NET_ADMIN capability controls or applying seccomp/AppArmor profiles to limit the triggerable code path - note this may disrupt legitimate IPsec VPN workloads on the affected host. An exact patched release version number per stable branch is not confirmed from the available reference data.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Container suse/hpc/warewulf4-x86_64/sle-hpc-node:15.6.17.8.134 Image SLES15-SP6 Image SLES15-SP6-BYOS Image SLES15-SP6-BYOS-Azure Image SLES15-SP6-BYOS-EC2 Image SLES15-SP6-BYOS-GCE Image SLES15-SP6-CHOST-BYOS Image SLES15-SP6-CHOST-BYOS-Aliyun Image SLES15-SP6-CHOST-BYOS-Azure Image SLES15-SP6-CHOST-BYOS-EC2 Image SLES15-SP6-CHOST-BYOS-GCE Image SLES15-SP6-CHOST-BYOS-GDC Image SLES15-SP6-CHOST-BYOS-SAP-CCloud Image SLES15-SP6-EC2 Image SLES15-SP6-EC2-ECS-HVM Image SLES15-SP6-GCE Image SLES15-SP6-HPC-BYOS Image SLES15-SP6-HPC-BYOS-Azure Image SLES15-SP6-HPC-BYOS-EC2 Image SLES15-SP6-HPC-BYOS-GCE Image SLES15-SP6-HPC-EC2 Image SLES15-SP6-HPC-GCE Image SLES15-SP6-Hardened-BYOS Image SLES15-SP6-Hardened-BYOS-Azure Image SLES15-SP6-Hardened-BYOS-EC2 Image SLES15-SP6-Hardened-BYOS-GCE Image SLES15-SP6-SAP Image SLES15-SP6-SAP-Azure Image SLES15-SP6-SAP-EC2 Image SLES15-SP6-SAP-GCE Image SLES15-SP6-SAPCAL Image SLES15-SP6-SAPCAL-Azure Image SLES15-SP6-SAPCAL-EC2 Image SLES15-SP6-SAPCAL-GCE Affected
Container suse/sl-micro/6.0/baremetal-os-container:latest Container suse/sl-micro/6.0/toolbox:latest Affected
Container suse/sl-micro/6.0/base-os-container:2.1.3-7.65 Image SLE-Micro Image SLE-Micro-Azure Image SLE-Micro-BYOS Image SLE-Micro-BYOS-Azure Image SLE-Micro-BYOS-EC2 Image SLE-Micro-BYOS-GCE Image SLE-Micro-EC2 Image SLE-Micro-GCE Affected
Container suse/sl-micro/6.0/kvm-os-container:2.1.3-6.88 Affected
Container suse/sl-micro/6.0/rt-os-container:2.1.3-7.105 Affected

Share

CVE-2025-39965 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy