Duplicate SPI Handling Vulnerability in Linux Kernel

linux Updated 02 Oct 2025

Summary

12/09/2025
N/A
No i
Unrated
Not published

CVE-2025-39797: In the Linux kernel, the following vulnerability has been resolved: xfrm: Duplicate SPI Handling The issue originates when Strongswan initiates an XFRM_MSG_ALLOCSPI Netlink message, which triggers the kernel function xfr... Affects linux versions 5.10.103-1 – 6.9.9-1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Linux kernel is the core component of the Linux operating system, responsible for managing system resources and facilitating communication between hardware and software. It provides essential services such as process management, memory management, and device control. The kernel's networking stack includes support for IPsec, which uses Security Parameter Index (SPI) for managing secure communications. This vulnerability affects the kernel's handling of SPI, potentially leading to security issues in network communications.

Vulnerability Detail

In the Linux kernel, a vulnerability has been identified related to the handling of Security Parameter Index (SPI) in the xfrm subsystem. When Strongswan initiates an XFRM_MSG_ALLOCSPI Netlink message, the kernel function xfrm_alloc_spi() is called to allocate a unique SPI for inbound Security Associations (SAs). However, this function can erroneously succeed even when the requested SPI is already in use, resulting in duplicate SPIs being assigned to multiple inbound SAs. This inconsistency can lead to packet processing failures and dropped packets, as the kernel may return an arbitrary SA during SPI lookups. The issue can be reliably reproduced by restricting the SPI range in the configuration file, leading to predictable duplicate SPI assignments.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

To work around this issue, you can restrict the available SPI range in the Strongswan configuration file (charon.conf) as follows: spi_min = 0x10000000 spi_max = 0x10000002. This will limit the system to only 2 usable SPI values, but be aware that this may lead to duplicate SPI assignments if more than 2 Child SAs are created.

Conclusion

The Duplicate SPI Handling vulnerability in the Linux kernel poses significant risks to secure network communications by allowing duplicate SPIs to be assigned. It is crucial to update to the patched versions of the Linux package to mitigate these risks. Users should also consider implementing the provided workaround if immediate updates are not feasible.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

The vulnerability can lead to packet processing failures and dropped packets due to inconsistent SPI lookups, which may compromise secure communications.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring signup.

The vulnerability affects the Linux kernel in Debian versions 11, 12, 13, and 14, with specific fixed versions available for Debian 13 (6.12.43-1) and Debian 14 (6.16.3-1).

If immediate updates are not possible, consider applying the workaround by restricting the SPI range in your configuration file to minimize the risk of duplicate SPI assignments.

Detailed information about the vulnerability can be found in the CVE report for CVE-2025-39797, which outlines the technical aspects and implications of the issue.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback