In the Linux kernel, the following vulnerability has been resolved:
xfrm: xfrmallocspi 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.
_xfrmstate_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.
[
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd8ae32e4e4652db55bce6b9c79267d8946765a9",
"signature_type": "Line",
"target": {
"file": "net/xfrm/xfrm_state.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"186589993230559022417702568474695526648",
"288395212914493735022642484445782465120",
"83148223151962832127088592056944974500",
"32894046745124291068309224719207581590",
"116688463558816151387996843800417860325",
"112770679393643728552295103544551105410",
"278176258792242583925295583644832922974"
]
},
"id": "CVE-2025-39965-19ca58b9"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a78e55776522373c446f18d5002a8de4b09e6bf7",
"signature_type": "Function",
"target": {
"function": "xfrm_alloc_spi",
"file": "net/xfrm/xfrm_state.c"
},
"deprecated": false,
"digest": {
"length": 1281.0,
"function_hash": "204696702811454039678638333660646540859"
},
"id": "CVE-2025-39965-1f8e0022"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9fcedabaae0096f712bbb4ccca6a8538af1cd1c8",
"signature_type": "Line",
"target": {
"file": "net/xfrm/xfrm_state.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"186589993230559022417702568474695526648",
"288395212914493735022642484445782465120",
"83148223151962832127088592056944974500",
"32894046745124291068309224719207581590",
"116688463558816151387996843800417860325",
"112770679393643728552295103544551105410",
"278176258792242583925295583644832922974"
]
},
"id": "CVE-2025-39965-3e93cd5c"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0baf92d0b1590b903c1f4ead75e61715e50e8146",
"signature_type": "Line",
"target": {
"file": "net/xfrm/xfrm_state.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"186589993230559022417702568474695526648",
"288395212914493735022642484445782465120",
"83148223151962832127088592056944974500",
"32894046745124291068309224719207581590",
"116688463558816151387996843800417860325",
"112770679393643728552295103544551105410",
"278176258792242583925295583644832922974"
]
},
"id": "CVE-2025-39965-8a8258c7"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9fcedabaae0096f712bbb4ccca6a8538af1cd1c8",
"signature_type": "Function",
"target": {
"function": "xfrm_alloc_spi",
"file": "net/xfrm/xfrm_state.c"
},
"deprecated": false,
"digest": {
"length": 1281.0,
"function_hash": "204696702811454039678638333660646540859"
},
"id": "CVE-2025-39965-94aeae02"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0baf92d0b1590b903c1f4ead75e61715e50e8146",
"signature_type": "Function",
"target": {
"function": "xfrm_alloc_spi",
"file": "net/xfrm/xfrm_state.c"
},
"deprecated": false,
"digest": {
"length": 1281.0,
"function_hash": "204696702811454039678638333660646540859"
},
"id": "CVE-2025-39965-aedb1dbd"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a78e55776522373c446f18d5002a8de4b09e6bf7",
"signature_type": "Line",
"target": {
"file": "net/xfrm/xfrm_state.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"186589993230559022417702568474695526648",
"288395212914493735022642484445782465120",
"83148223151962832127088592056944974500",
"32894046745124291068309224719207581590",
"116688463558816151387996843800417860325",
"112770679393643728552295103544551105410",
"278176258792242583925295583644832922974"
]
},
"id": "CVE-2025-39965-e7269292"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd8ae32e4e4652db55bce6b9c79267d8946765a9",
"signature_type": "Function",
"target": {
"function": "xfrm_alloc_spi",
"file": "net/xfrm/xfrm_state.c"
},
"deprecated": false,
"digest": {
"length": 1281.0,
"function_hash": "204696702811454039678638333660646540859"
},
"id": "CVE-2025-39965-f9aef522"
}
]