CVE-2025-22040
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-22040 is a vulnerability discovered in the Linux kernel affecting the ksmbd component. The vulnerability was disclosed on April 16, 2025, and involves a race condition between session setup and ksmbd_sessions_deregister processes. The issue affects multiple versions of the Linux kernel, including versions from 6.2 to 6.6.87, 6.7 to 6.12.23, 6.13 to 6.13.11, and 6.14 to 6.14.2 (NVD).

Technical details

The vulnerability is classified as a Use-After-Free (CWE-416) issue where a race condition exists in the ksmbd component. Specifically, the session can be freed before the connection is added to the channel list of session. The CVSS v3.1 base score is 7.8 (High), with the vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, indicating local access requirements with high impact potential (NVD).

Impact

The vulnerability could potentially lead to unauthorized access to system resources, data corruption, or system crashes due to the use-after-free condition in the kernel's memory management. The high CVSS score indicates significant potential impact on system confidentiality, integrity, and availability (NVD).

Mitigation and workarounds

A patch has been developed that checks the reference count of the session before freeing it, preventing the race condition. The fix has been implemented in the Linux kernel version 6.12.25-1 and later versions. Multiple Linux distributions, including Ubuntu and Debian, are in the process of releasing security updates to address this vulnerability (Debian, Ubuntu).

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-71142N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel-matched
NoNoJan 14, 2026
CVE-2025-71137N/AN/A
  • Linux KernelLinux Kernel
  • linux-gcp
NoYesJan 14, 2026
CVE-2025-71135N/AN/A
  • Linux KernelLinux Kernel
  • kernel-debug-core
NoNoJan 14, 2026
CVE-2025-71134N/AN/A
  • Linux KernelLinux Kernel
  • kernel-uki-virt
NoNoJan 14, 2026
CVE-2025-71133N/AN/A
  • Linux KernelLinux Kernel
  • kernel-modules-extra
NoYesJan 14, 2026

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