Path Buffer Vulnerability in Linux Kernel's ksmbd Package

linux Updated 02 Oct 2025

Summary

21/01/2025
N/A
Yes i
Unrated
Not published

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 ↓

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 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 →

Share this vulnerability

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.

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 →

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