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).

Exploitability

The vulnerability requires local access and low attack complexity to exploit. An attacker would need local system access and the ability to interact with the ksmbd component to potentially trigger the race condition (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

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

linux: 6.1.135-1

Fixed

sid

linux: 6.12.25-1

Fixed

trixie

linux: 6.12.25-1

Fixed

Ubuntu

Fixed

bionic

linux

Not Affected

bionic (esm-infra)

linux

Not Affected

bionic (fips-updates)

linux-fips

Not Affected

bionic (fips)

linux-fips

Not Affected

devel

linux

Not Affected

focal

linux

Not Affected

focal (esm-infra)

linux-hwe-5.15

Affected

focal (fips-updates)

linux-fips

Not Affected

RHEL / CentOS

Affected

RHEL 8

Not Affected

RHEL 9

Not Affected

RHEL 10

Not Affected

Source: This report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-121876HIGH7.9
  • Linux Kernel logoLinux Kernel
  • kernel-tools-libs-devel
NoNoNov 12, 2026
CVE-2026-99287MEDIUM6.5
  • Linux Kernel logoLinux Kernel
  • linux-nvidia-tegra-igx
NoYesNov 10, 2026
CVE-2024-21963MEDIUM6
  • Linux Kernel logoLinux Kernel
  • linux-lowlatency-hwe-5.15
NoYesNov 12, 2026
CVE-2026-99288MEDIUM5.9
  • Linux Kernel logoLinux Kernel
  • kernel-doc
NoYesNov 10, 2026
CVE-2026-0004MEDIUM5.7
  • Linux Kernel logoLinux Kernel
  • kernel-uek-debug-modules-wireless
NoYesNov 12, 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

Additional Wiz resources

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