Use-After-Free Vulnerability in Linux Kernel (CVE-2025-22041)
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.