CVE-2026-64400

ksmbd: prevent path traversal bypass by restricting caseless retry

Published Jul 25, 2026 CVSS 3.1 · 8.6 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ksmbd: prevent path traversal bypass by restricting caseless retry

ksmbd_vfs_path_lookup() enforces LOOKUP_BENEATH to restrict path
resolution within the share root. When a crafted path attempts to
escape the share boundary using parent-directory components ('..'),
vfs_path_parent_lookup() detects this and immediately fails,
returning -EXDEV.

However, a bug exists in __ksmbd_vfs_kern_path() under caseless mode.
The function fails to intercept the -EXDEV error and erroneously
falls through to the caseless retry logic, which is intended only
for genuinely missing files. During this retry process, the path
is reconstructed, leading to an unintended LOOKUP_BENEATH bypass
that allows write-capable users to create zero-length files or
directories outside the exported share.

Fix this by ensuring that the execution only proceeds to the caseless
lookup retry when the error is specifically -ENOENT. Any other errors,
such as -EXDEV from a path traversal attempt, must be returned immediately.

Analysis

AI-generated

Technical impact

The vulnerability in the ksmbd module permits write‑capable users to escape the share root and create zero‑length files or directories outside the exported share. This bypass arises when the system incorrectly retries caseless lookups after a -EXDEV error, allowing a crafted path containing '..' components to be resolved beyond the intended boundary.

Affected Systems

The flaw exists in the Linux kernel’s ksmbd component, affecting any distribution that includes ksmbd before the patch. The affected product is the Linux kernel; no specific version range is listed, so all kernels compiled with ksmbd prior to the fix are vulnerable.

Risk and Exploitability

This vulnerability has a CVSS score of 8.6, while its EPSS score is below 1%, indicating that exploitation is unlikely but still possible. The vulnerability is not in CISA’s KEV list and no public exploit is known. An attacker would need write access to an SMB share and be able to send a crafted path with '..' components. The likely attack vector is a SMB client with write privileges, potentially enabling the creator of critical system files if the share overlaps the file system.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that includes the ksmbd patch.
  • If upgrading is not immediately possible, disable ksmbd caseless mode or restrict SMB shares to read‑only for users lacking file‑creation privileges.
  • Ensure that SMB share configuration limits write permissions to trusted users only.

Generated by OpenCVE AI on September 4, 2026 at 22:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4904-1 linux-6.12 security update
Debian DLA Debian DLA DLA-4906-1 linux security update
Ubuntu USN Ubuntu USN USN-8726-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8727-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8760-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-2 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-8781-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-3 Linux kernel (IBM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8800-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8760-2 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-9173-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9175-1 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-9173-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9183-1 Linux kernel (FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-9173-3 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9174-2 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9191-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9192-1 Linux kernel (NVIDIA) vulnerabilities
History
Type Values Removed Values Added
Weaknesses NVD-CWE-noinfo
Type Values Removed Values Added
Weaknesses CWE-20
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H'}

Type Values Removed Values Added
Weaknesses CWE-20
CWE-22
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: prevent path traversal bypass by restricting caseless retry ksmbd_vfs_path_lookup() enforces LOOKUP_BENEATH to restrict path resolution within the share root. When a crafted path attempts to escape the share boundary using parent-directory components ('..'), vfs_path_parent_lookup() detects this and immediately fails, returning -EXDEV. However, a bug exists in __ksmbd_vfs_kern_path() under caseless mode. The function fails to intercept the -EXDEV error and erroneously falls through to the caseless retry logic, which is intended only for genuinely missing files. During this retry process, the path is reconstructed, leading to an unintended LOOKUP_BENEATH bypass that allows write-capable users to create zero-length files or directories outside the exported share. Fix this by ensuring that the execution only proceeds to the caseless lookup retry when the error is specifically -ENOENT. Any other errors, such as -EXDEV from a path traversal attempt, must be returned immediately.
Title ksmbd: prevent path traversal bypass by restricting caseless retry
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • NVD-CWE-noinfo

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 30, 2026, 12:27 PM
Reserved
Jul 19, 2026, 3:36 PM
Status
Modified
Published
Jul 25, 2026, 10:17 AM
Modified
Oct 30, 2026, 1:19 PM
Severity
Public date
Jul 25, 2026, 12:00 AM