CVE-2025-39965
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-39965 is a vulnerability discovered in the Linux kernel's XFRM subsystem. The issue was identified and disclosed on October 13, 2025, affecting the XFRM state management functionality. The vulnerability specifically involves the improper handling of Security Parameter Index (SPI) values where x->id.spi == 0 in the xfrmallocspi function (NVD).

Technical details

The vulnerability stems from a change introduced by commit 94f39804d891 ("xfrm: Duplicate SPI Handling") which allows states to be created and added to the byspi list with a value of 0, despite this value meaning "no SPI assigned". The _xfrmstate_delete function does not remove these states from the byspi list since they shouldn't be there, resulting in a Use-After-Free (UAF) vulnerability when traversing the byspi list (NVD).

Impact

The vulnerability could potentially lead to a Use-After-Free condition in the Linux kernel, which typically can result in system crashes, memory corruption, or potential privilege escalation. This affects the kernel's ability to properly manage XFRM states, which are crucial for IPsec functionality (NVD).

Mitigation and workarounds

The vulnerability has been fixed in the latest kernel versions, as indicated by the Debian security tracker marking it as "fixed in unstable". Users are advised to update their systems to the patched versions once available (Debian).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-39961MEDIUM5.8
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-modules-core
NoYesOct 09, 2025
CVE-2025-39958LOW3.7
  • Linux KernelLinux Kernel
  • linux-aws-6.14
NoYesOct 09, 2025
CVE-2025-39965N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel
NoNoOct 13, 2025
CVE-2025-39964N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-modules-extra
NoYesOct 13, 2025
CVE-2025-39959N/AN/A
  • Linux KernelLinux Kernel
  • linux-gcp-fips
NoYesOct 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management