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-05-07
AI Q&A
2025-10-13
EPSS Evaluated
2026-05-05
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 Powered Q&A
Can you explain this vulnerability to me?

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.


How can this vulnerability impact me? :

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.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart