CVE-2026-99535 in Linuxinfo

Summary

by MITRE • 11/19/2026

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: prevent share root removal through empty paths

A FileLinkInformation request can supply "/" as the new link name. smb2_get_name() strips the trailing slash and passes an empty string to ksmbd_vfs_kern_path_start_removing().

ksmbd_vfs_path_lookup() resolves an empty pathname as the configured share path, without LOOKUP_BENEATH. With ReplaceIfExists set, smb2_create_link() can therefore remove the share root from its parent before link creation fails. An authenticated client with a writable share and DELETE access to a file can trigger this if the share root is empty and the mapped user has write and search permission on its parent directory.

Return -EINVAL for empty pathnames when for_remove is set, before resolving the share path or acquiring removal resources. Ordinary lookups continue to accept empty pathnames for opening the share root.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/20/2026

The vulnerability identified in the Linux kernel's ksmbd component represents a critical logic flaw within the SMB2 protocol implementation that allows an authenticated attacker to potentially delete the root directory of a shared folder, leading to significant data loss and service disruption. The core issue stems from how the server handles FileLinkInformation requests where the new link name is specified as a forward slash character. When such a request arrives, the smb2_get_name function processes the input by stripping trailing slashes, which results in an empty string being passed downstream to ksmbd_vfs_kern_path_start_removing. This transformation of a valid path representation into an empty pathname bypasses standard directory traversal protections because the subsequent lookup mechanism interprets this empty string not as an error condition but as a reference to the configured share root itself.

The operational impact is severe due to the interaction between path resolution and access control checks. The function ksmbd_vfs_path_lookup resolves an empty pathname directly to the share's root directory without enforcing LOOKUP_BENEATH constraints, which are typically designed to prevent operations from escaping or affecting parent directories in unintended ways. Consequently, when a client issues a create link operation with ReplaceIfExists set and provides this manipulated path, the system proceeds to remove the share root from its parent directory before verifying whether the actual link creation can succeed. This sequence of events means that if an authenticated user possesses write permissions on the file being linked and delete access rights to the parent directory containing the share root, they can trigger the deletion logic prematurely. The result is the removal of the entire shared folder structure, effectively destroying data accessible through that specific SMB share.

This flaw aligns with CWE-20 Improper Input Validation, as the system fails to adequately validate and sanitize path inputs before performing destructive file operations. Furthermore, it relates to CWE-732 Incorrect Permission Assignment for Critical Resource because the access control checks do not sufficiently restrict actions on the root directory based on the intended scope of a link creation operation. From an ATT&CK perspective, this vulnerability facilitates Defense Evasion by allowing attackers to disrupt availability and potentially cover their tracks by destroying evidence or shared resources, falling under techniques related to Impact such as Data Destruction or Service Stoppage. The lack of proper boundary checking for empty pathnames during removal operations highlights a gap in the implementation's adherence to secure coding practices regarding file system manipulation.

To mitigate this vulnerability, developers have implemented a fix that explicitly returns an invalid argument error code when an empty pathname is detected specifically within the context of a removal operation. This check occurs early in the process, before any path resolution against the share root or acquisition of resources required for deletion takes place. By rejecting empty paths at this stage, the system prevents the accidental invocation of directory removal logic while preserving normal functionality for legitimate use cases where an empty pathname is correctly interpreted as opening the share root itself during standard file access operations rather than structural modification. Administrators should ensure that their systems are updated with patches addressing this specific ksmbd flaw to prevent unauthorized deletion of shared folder roots by authenticated users with elevated permissions on parent directories.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!