CVE-2025-39965
published high CVSS 3.1 · 7.8xfrm: xfrm_alloc_spi shouldn't use 0 as SPI
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux3d8090bb53424432fa788fe9a49e8ceca74f0544 to < 0baf92d0b1590b903c1f4ead75e61715e50e8146 · 2fc5b54368a1bf1d2d74b4d3b8eea5309a653e38 to < 9fcedabaae0096f712bbb4ccca6a8538af1cd1c8 · 29e9158f91f99057dbd35db5e8674d93b38549fe to < a78e55776522373c446f18d5002a8de4b09e6bf7 · 94f39804d891cffe4ce17737d295f3b195bc7299 to < cd8ae32e4e4652db55bce6b9c79267d8946765a9 · fb58962aa3b9359988c7b5b15a971fd9ad5b0ecd · c67d4e7a8f90fb6361ca89d4d5c9a28f4e935e47 · 6.1.191 to < 6.2 · 6.15.11 to < 6.16 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.6.103 to < 6.6.109 · 6.12.43 to < 6.12.50 · 6.16.2 to < 6.16.10 · Other versions: unaffected | Affected | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-1254 | Fixed | Not stated | Amazon Linux assessment |
| Oracle Linux | 10 | kernel-uekaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uekx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
Show 97 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Oracle Linux | 10 | kernel-uek-corex86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debugaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debugx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-corex86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-develaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-develx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modulesaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modulesx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-corex86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-desktopaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-desktopx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extraaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extrax86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-usbaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-usbx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-wirelessaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-debug-modules-wirelessx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-develaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-develx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-docx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modulesaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modulesx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-corex86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-desktopaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-desktopx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-extraaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-extrax86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-usbaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-usbx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-wirelessaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-modules-wirelessx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-toolsaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek-toolsx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64kaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-develaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-modulesaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-modules-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-modules-desktopaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-modules-extraaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-modules-usbaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 10 | kernel-uek64k-modules-wirelessaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el10uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uekaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uekx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-corex86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debugaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debugx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-corex86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-develaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-develx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modulesaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modulesx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-corex86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-desktopaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-desktopx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extraaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extrax86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-usbaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-usbx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-wirelessaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-debug-modules-wirelessx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-develaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-develx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-docx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modulesaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modulesx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-coreaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-corex86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-desktopaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-desktopx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-extraaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-extrax86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
| Oracle Linux | 9 | kernel-uek-modules-usbaarch64 | Advisory build | 0:6.12.0-104.43.4.3.el9uek | ELSA-2025-20719 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerability is reached through the XFRM_MSG_ALLOCSPI message on a NETLINK_XFRM socket, which requires local system access. Although the dangling byspi entry can subsequently be dereferenced by a received ESP/AH packet, creating the SPI-0 state requires the local netlink path. AC:L - The attacker deterministically triggers the bug by requesting min=max=0, which verify_spi_info() accepts, then deleting the state via DELSA/FLUSHSA; there is no race, no memory-layout dependency, and no non-default config beyond ubiquitous CONFIG_XFRM_USER. PR:L - xfrm_user_rcv_msg() gates on netlink_net_capable(skb, CAP_NET_ADMIN), which is evaluated against the net namespace's user_ns, so any unprivileged user obtains it via "unshare -Urn". This is Low, not High. UI:N - The full sequence — allocate SPI 0, delete the state, re-walk the byspi hash — is performed entirely by the attacker's own process with no victim action required. S:U - The freed xfrm_state and the corrupted hash list both live in the kernel's own security authority; this is standard kernel memory corruption with no VM, IOMMU, or hypervisor boundary crossed. C:H - The dangling xfrm_state remains in a global RCU hash and is read back and returned as a live SA, so a reclaimed object leaks adjacent heap contents and crypto/key state, and the UAF can be escalated into an arbitrary kernel read primitive. I:H - Walkers perform refcount_inc_not_zero on the freed object (a write to freed memory) and then use it as a live SA whose type/mode function-pointer fields the attacker can control by re-spraying the xfrm_state slab, yielding control-flow hijack and arbitrary write. A:H - Dereferencing the freed state during byspi traversal, hash resize, or netns teardown (WARN_ON(!hlist_empty())) reliably produces a KASAN-detected use-after-free, list corruption, and kernel panic.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 3d8090bb53424432fa788fe9a49e8ceca74f0544 to < 0baf92d0b1590b903c1f4ead75e61715e50e8146 (affected · git)2fc5b54368a1bf1d2d74b4d3b8eea5309a653e38 to < 9fcedabaae0096f712bbb4ccca6a8538af1cd1c8 (affected · git)29e9158f91f99057dbd35db5e8674d93b38549fe to < a78e55776522373c446f18d5002a8de4b09e6bf7 (affected · git)94f39804d891cffe4ce17737d295f3b195bc7299 to < cd8ae32e4e4652db55bce6b9c79267d8946765a9 (affected · git)fb58962aa3b9359988c7b5b15a971fd9ad5b0ecd (affected · git)c67d4e7a8f90fb6361ca89d4d5c9a28f4e935e47 (affected · git)6.1.191 to < 6.2 (affected · semver)6.15.11 to < 6.16 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 6.6.103 to < 6.6.109 (affected · semver)6.12.43 to < 6.12.50 (affected · semver)6.16.2 to < 6.16.10 (affected · semver)Default: unaffected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
2Linux · cna
xfrm: xfrm_alloc_spi shouldn't use 0 as SPI
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 5ca3d5bf179eeccefb8358ef9f29a5c092c1d430de7f4d9fab88dbf531c7b219
- Ingested
- 30 Oct 2026, 12:31:36 UTC
- Source record
- Official CVE record