Path Buffer Vulnerability in Linux Kernel's ksmbd Package
Summary
CVE-2025-21660: In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked When ksmbd_vfs_kern_path_locked met an error and it is not the last entry, it will ex... Affects linux versions < 6.1.128-1. Fixed in 6.1.128-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 a core component of many operating systems, providing essential services for hardware management and system resources. The ksmbd module specifically enables SMB (Server Message Block) protocol support, allowing file sharing and printer services over a network. This module is crucial for interoperability between Linux and Windows systems, but it is susceptible to vulnerabilities that can compromise system integrity and security.
Vulnerability Detail
In the Linux kernel, a vulnerability has been identified in the ksmbd module related to the function ksmbd_vfs_kern_path_locked. When this function encounters an error and is not at the last entry, it exits without restoring the changed path buffer. This oversight can lead to the buffer being used later as a filename for file creation, potentially resulting in unauthorized file access or corruption. The vulnerability can be exploited by an attacker with access to the SMB service, posing significant risks to data integrity and system security.
How To Fix
Minimum fixed version
6.1.128-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 mentioned for this vulnerability. It is recommended to apply the patch as soon as it becomes available to mitigate any potential risks.
Conclusion
The CVE-2025-21660 vulnerability in the Linux kernel's ksmbd module poses significant risks to system security and data integrity. Users are advised to update their kernel packages to the latest versions to mitigate these risks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for linux →
FAQ
CVE-2025-21660 is a vulnerability in the Linux kernel's ksmbd module that can lead to unauthorized file access due to improper handling of path buffers.
You can use Vulert, which monitors open-source vulnerabilities in your software. By using the Vulert playground, you can check if your application is affected by this vulnerability without any signup.
The vulnerability can lead to unauthorized file access, data corruption, and potential system compromise if exploited by an attacker.
Yes, a patch is available. Users should update their Linux kernel package to the latest version to ensure they are protected against this vulnerability.
It is recommended to regularly check for updates and apply them promptly, especially when security vulnerabilities are disclosed.
Related vulnerabilities
Recent vulnerabilities recorded for linux.