CVE-2025-21864
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-21864 is a vulnerability in the Linux kernel's TCP implementation discovered in March 2025. The issue involves improper handling of secpath references when dropping network namespace resources, specifically affecting TCP connections over ipcomp6. The vulnerability was initially reported by Xiumei Mu and received a CVSS v3.1 base score of 5.5 (Medium) (NVD).

Technical details

The vulnerability occurs when an skb (socket buffer) with a secpath reference is deferred for freeing on a CPU's deferlist, and the network namespace is deleted before the list is flushed. This results in a lingering reference to xfrmstate through the secpath, which remains attached to the skb. The issue manifests specifically during TCP tests over ipcomp6 when creating and deleting network namespace pairs. The vulnerability is classified as CWE-476 (NULL Pointer Dereference) and affects Linux kernel versions from 5.19 to 6.13.5 (NVD).

Impact

The vulnerability can lead to a warning in xfrm6tunnelnetexit and potential resource leaks when network namespaces are deleted. While the skb itself is not leaked and eventually ends up in skreceivequeue for deferred freeing, the lingering reference to xfrmstate can cause unexpected behavior during network namespace cleanup (Kernel Patch).

Mitigation and workarounds

The issue has been fixed by modifying the TCP receive path to drop the secpath at the same time as the dst is dropped. The fix ensures that the secpath is reset after the LSM hooks have completed their operations but before the MPTCP extension is attached to the skb. The patch has been integrated into multiple kernel versions through the stable tree (Kernel Patch).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40344N/AN/A
  • Linux KernelLinux Kernel
  • kernel-debug-modules-internal
NoYesDec 09, 2025
CVE-2025-40343N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel
NoYesDec 09, 2025
CVE-2025-40342N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel-matched
NoYesDec 09, 2025
CVE-2025-40341N/AN/A
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-modules-extra
NoYesDec 09, 2025
CVE-2025-40340N/AN/A
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-kvm
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management