CVE-2025-39965 Details
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.
A use-after-free vulnerability has been introduced in the Linux kernel's XFRM (IPsec) state management. This issue arises because the function 'xfrm_alloc_spi' incorrectly uses 0 as a valid Security Parameter Index (SPI) value. In the context of XFRM, an SPI of 0 indicates 'no SPI assigned'. However, due to a previous commit that changed how SPIs are handled, states are now erroneously created and added to the 'bys' list with this value. The 'xfrm_state_delete' function fails to remove these incorrect entries, leading to a use-after-free condition when the 'bys' list is processed again.
Users can upgrade to the latest version of the Linux kernel where this vulnerability has been fixed. Instructions for upgrading the kernel can be found in the official Linux kernel documentation.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Oct 15, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/0baf92d0b1590b903c1f4ead75e61715e50e8146 | kernel.org | Patch |
| https://git.kernel.org/stable/c/9fcedabaae0096f712bbb4ccca6a8538af1cd1c8 | kernel.org | Patch |
| https://git.kernel.org/stable/c/a78e55776522373c446f18d5002a8de4b09e6bf7 | kernel.org | Patch |
| https://git.kernel.org/stable/c/cd8ae32e4e4652db55bce6b9c79267d8946765a9 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| NVD-CWE-noinfo | Insufficient Information to Classify Weakness | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.6.103, < 6.6.109 >= 6.12.43, < 6.12.50 >= 6.15.11, < 6.16 >= 6.16.2, < 6.16.10 6.17 rc1 6.17 rc2 6.17 rc3 6.17 rc4 6.17 rc5 6.17 rc6 6.17 rc7 |
CPE
Remediation
| |
Change History
9 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 30, 2026 | CVE Modified | kernel.org |
| Oct 19, 2026 | CVE Translated | [email protected] |
| Oct 15, 2026 | CVE Modified | kernel.org |
| Oct 15, 2026 | CVE Modified | CISA-ADP |
| Jul 30, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Feb 26, 2026 | Reanalysis | [email protected] |
| Feb 3, 2026 | Initial Analysis | [email protected] |
| Oct 13, 2025 | New CVE Received | kernel.org |