CVE-2025-39965
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-10-13

Last updated on: 2026-02-26

Assigner: kernel.org

Description
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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-10-13
Last Modified
2026-02-26
Generated
2026-06-16
AI Q&A
2025-10-13
EPSS Evaluated
2026-06-15
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
linux linux_kernel 6.17
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability in the Linux kernel involves the xfrm subsystem where the function xfrm_alloc_spi incorrectly uses 0 as a Security Parameter Index (SPI). The value 0 means 'no SPI assigned', but due to a commit, states with SPI 0 are created and added to the byspi list. The __xfrm_state_delete function does not remove these states from the byspi list because they should not be there, leading to a use-after-free (UAF) condition when the byspi list is accessed again.

Impact Analysis

This vulnerability can lead to a use-after-free condition in the Linux kernel's xfrm subsystem, which may cause system instability, crashes, or potentially allow an attacker to execute arbitrary code or escalate privileges by exploiting the improper handling of SPI 0 states.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-39965. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart