Use-After-Free Vulnerability in Linux Kernel (CVE-2025-22041)

linux Updated 02 Oct 2025

Summary

16/04/2025
N/A
Yes i
Unrated
Not published

CVE-2025-22041: In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free in ksmbd_sessions_deregister() In multichannel mode, UAF issue can occur in session_deregister when the second channel sets up... Affects linux versions < 6.1.135-1. Fixed in 6.1.135-1. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Linux kernel is the core component of many operating systems, providing essential services for hardware management and system resources. It supports a wide range of functionalities, including process management, memory management, and device drivers. The kernel is crucial for system stability and security. This specific vulnerability affects the ksmbd module, which is responsible for implementing the SMB protocol in Linux, allowing file sharing and network communication with Windows systems.

Vulnerability Detail

CVE-2025-22041 is a use-after-free (UAF) vulnerability found in the ksmbd module of the Linux kernel. This issue arises in multichannel mode when a session is deregistered while still being accessed through another channel. The vulnerability can lead to unauthorized access to freed memory, potentially allowing an attacker to execute arbitrary code or crash the system. The flaw is particularly concerning in environments where multiple channels are used for session management, increasing the risk of exploitation.

How To Fix

Minimum fixed version

6.1.135-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade linux

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no specific workarounds provided for this vulnerability. It is advisable to monitor the system for any unusual activity and apply the patch as soon as it becomes available.

Conclusion

CVE-2025-22041 represents a significant security risk within the Linux kernel's ksmbd module due to a use-after-free vulnerability. Users are strongly encouraged to update their systems to the latest patched versions to mitigate potential risks. Regular monitoring and prompt application of security updates are essential for maintaining system integrity.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

CVE-2025-22041 is a use-after-free vulnerability in the ksmbd module of the Linux kernel, which can lead to unauthorized memory access.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The risks include potential unauthorized access to system memory, which could lead to arbitrary code execution or system crashes.

Yes, a patch is available. Users should update their Linux packages to the latest version to mitigate the vulnerability.

If you cannot apply the patch immediately, monitor your system for unusual activity and consider isolating affected systems until the patch can be applied.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

Minimum fixed version

6.1.135-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade linux

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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