Skip to main content
Vulnerability Database/CVE-2026-93787

CVE-2026-93787: Linux Kernel CIFS Buffer Overflow Vulnerability

CVE-2026-93787 is a buffer overflow flaw in the Linux kernel CIFS client that allows malicious SMB1 servers to trigger out-of-bounds memory reads. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-93787 Overview

CVE-2026-93787 is an out-of-bounds read vulnerability in the Linux kernel CIFS client. The flaw resides in the cifs_filldir() function, which processes SMB1 TRANS2_FIND_FIRST and FIND_NEXT directory listing responses. The function copies entry names using a de.namelen length field supplied by the server without verifying that de.name + de.namelen remains within the response buffer.

A hostile SMB1 server can return an oversized FileNameLength field, causing memchr() inside verify_dirent_name() to read beyond the end of the kmalloc'd response slab buffer. Any user with permission to list a directory on an attacker-controlled CIFS mount can trigger the condition through getdents64().

Critical Impact

An attacker-controlled SMB1 server can trigger kernel slab out-of-bounds reads, enabling potential information disclosure or system crashes against any client listing an attacker-served directory.

Affected Products

  • Linux kernel CIFS client (fs/smb/client/)
  • Systems mounting CIFS/SMB1 shares via the in-kernel client
  • Distributions shipping kernels prior to the backport commits 03003506, 6e3b9652, and f8cf09a5

Discovery Timeline

  • 2026-09-24 - CVE-2026-93787 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-93787

Vulnerability Analysis

The Linux CIFS client parses SMB1 directory responses by iterating over variable-length FILE_DIRECTORY_INFO style records returned by the server. Each record contains a FileNameLength field (de.namelen) that the client uses to locate and copy the file name into the directory emission path.

The cifs_filldir() routine passes the name pointer and length down to filldir64(), which in turn invokes verify_dirent_name(). That helper calls memchr() across namelen bytes to validate the string. If the server-supplied length exceeds the remaining space in the SMB response buffer, memchr() walks past the allocation boundary.

KASAN captures the condition as a slab-out-of-bounds read of size 1, with the call chain traversing __x64_sys_getdents64 → iterate_dir → cifs_readdir → cifs_filldir → filldir64 → memchr. The read can expose adjacent slab memory contents or crash the kernel depending on allocator layout.

Root Cause

The client trusts the attacker-controlled FileNameLength field in SMB1 TRANS2_FIND_FIRST / FIND_NEXT responses. No bounds check verifies that de.name + de.namelen lies within the end-of-response pointer before the name is forwarded to filldir64(). The fix propagates the response end pointer into cifs_filldir() and rejects any entry whose name would extend past that boundary.

Attack Vector

Exploitation requires a user on a victim host to list a directory on a CIFS mount served by an attacker-controlled SMB1 server. The attacker constructs a directory response containing a crafted entry with an oversized FileNameLength. When the client calls getdents64() on the mounted directory, the kernel reads past the slab allocation. The Artiphishell vTriage pipeline produced a userspace reproducer that reliably triggers the KASAN report on unpatched kernels.

See the upstream fixes for implementation details: Linux Kernel Commit 03003506, Linux Kernel Commit 6e3b9652, and Linux Kernel Commit f8cf09a5.

Detection Methods for CVE-2026-93787

Indicators of Compromise

  • KASAN reports showing slab-out-of-bounds in memchr with a call stack through cifs_filldir and cifs_readdir
  • Unexpected kernel oops or panic entries referencing fs/smb/client/readdir.c during directory enumeration
  • CIFS mounts negotiated to the SMB1 dialect against untrusted or externally hosted servers

Detection Strategies

  • Audit mount and /proc/mounts entries for cifs file systems using vers=1.0 or defaulting to SMB1 negotiation
  • Inspect kernel ring buffer (dmesg) for KASAN or general protection fault traces originating in cifs_filldir
  • Monitor outbound SMB connections on TCP/445 to untrusted destinations initiated by endpoints with CIFS kernel support loaded

Monitoring Recommendations

  • Collect kernel logs centrally and alert on panic, oops, or KASAN signatures that reference the CIFS code paths
  • Track installed kernel package versions across the fleet and flag hosts missing the fix commits
  • Correlate directory enumeration syscalls on CIFS mounts with the remote server reputation and network path

How to Mitigate CVE-2026-93787

Immediate Actions Required

  • Apply the Linux stable kernel updates containing commits 03003506, 6e3b9652, and f8cf09a5 as soon as vendor packages are available
  • Avoid mounting CIFS shares from untrusted or internet-exposed SMB servers until patches are deployed
  • Disable the SMB1 dialect on CIFS clients where possible by enforcing vers=3.0 or higher at mount time

Patch Information

The upstream fix propagates the end-of-response pointer into cifs_filldir() and rejects directory entries whose names extend past the response boundary. Patched kernels are available via Linux Kernel Commit 03003506, Linux Kernel Commit 6e3b9652, and Linux Kernel Commit f8cf09a5. Consult your distribution's security tracker for backported package versions.

Workarounds

  • Restrict CIFS mounts to trusted servers inside controlled network segments
  • Enforce SMB2 or SMB3 negotiation on all CIFS mounts to bypass the vulnerable SMB1 code path
  • Block outbound TCP/445 traffic at the perimeter to prevent clients from reaching hostile SMB servers
bash
# Enforce SMB3 and disable SMB1 fallback at mount time
mount -t cifs //server/share /mnt/share \
  -o vers=3.0,sec=krb5,username=user

# Verify negotiated dialect per mount
cat /proc/fs/cifs/DebugData | grep -i 'SMB.*Version'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.