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

CVE-2026-93794: Linux Kernel Privilege Escalation Vulnerability

CVE-2026-93794 is a privilege escalation vulnerability in the Linux kernel SMB client that occurs when punching holes after buffered writes. This post explains its technical details, 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-93794 Overview

CVE-2026-93794 is a Linux kernel vulnerability in the SMB client (smb/client) subsystem. The flaw occurs when the kernel punches a hole in a file after a large buffered write without first flushing dirty page cache data. A dirty folio spanning the punched range can be written back after the hole punch operation completes, refilling the hole with stale data. The resulting file layout differs from what applications expect, breaking SEEK_HOLE and SEEK_DATA semantics. The upstream fix flushes and waits for dirty data in the punched range before invalidating the page cache and issuing FSCTL_SET_ZERO_DATA.

Critical Impact

Applications relying on sparse file semantics over SMB mounts may receive incorrect data layout information, leading to data integrity issues when combining buffered writes with fallocate hole-punch operations.

Affected Products

  • Linux kernel SMB client (cifs.ko / smb/client)
  • Linux distributions shipping affected kernel versions prior to the fix commits
  • SMB/CIFS mounts connecting to servers such as Samba and ksmbd

Discovery Timeline

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

Technical Details for CVE-2026-93794

Vulnerability Analysis

The vulnerability is a file system data integrity issue (ordering bug) in the Linux kernel SMB client's hole-punch code path. When an application performs a large buffered write and then issues an fpunch (file punch) to zero out a region of the file, the client issues FSCTL_SET_ZERO_DATA to the server. However, dirty pages in the page cache that overlap the punched region are not flushed before the punch completes. After the punch, the kernel can write those dirty pages back to the server, overwriting the zeroed region with the original cached data.

The reproducer uses xfs_io to write 3 MiB of data, punch a 1 MiB hole at offset 1 MiB, and then query sparse layout with SEEK_HOLE and SEEK_DATA. The expected layout is DATA | HOLE | DATA, but the entire file is reported as data because the hole has been refilled.

Root Cause

The root cause is an ordering violation in the SMB client's hole-punch implementation. The code invalidates the page cache and issues FSCTL_SET_ZERO_DATA without first flushing (filemap_write_and_wait_range) dirty folios in the punched range. Any dirty folio spanning the range can be written back after the server-side zero operation.

Attack Vector

The issue is a local data integrity defect rather than a remotely exploitable flaw. It is triggered by legitimate workloads that mix buffered writes with fallocate(FALLOC_FL_PUNCH_HOLE) on files hosted on SMB mounts. Applications relying on sparse file semantics, such as backup tools, virtual machine disk managers, or database engines, may silently receive incorrect file layouts. The xfstestsgeneric/539 test case exercises this path and passes once the fix is applied.

No exploit code is required; the condition is deterministic and reproducible with xfs_io.

Detection Methods for CVE-2026-93794

Indicators of Compromise

  • Unexpected results from SEEK_HOLE and SEEK_DATA lseek operations on files residing on SMB/CIFS mounts
  • xfstests generic/539 failures against Samba or ksmbd targets from affected kernels
  • Backup, snapshot, or VM-image tools reporting bloated file sizes or missing sparse regions on SMB-mounted storage

Detection Strategies

  • Compare the installed kernel version and SMB client commit history against the fix commits 39562a56, 6c265aca, and d7d2adcd referenced in the upstream advisory
  • Run the xfstestsgeneric/539 test suite against SMB mounts to validate correct hole-punch behavior
  • Audit application logs for file consistency errors from workloads that use fallocate with FALLOC_FL_PUNCH_HOLE on SMB-mounted paths

Monitoring Recommendations

  • Inventory Linux hosts mounting SMB/CIFS shares and record kernel versions for patch tracking
  • Monitor change-management systems for kernel updates that include the SMB client hole-punch fix
  • Alert on backup verification failures or integrity-check mismatches on files stored on SMB shares

How to Mitigate CVE-2026-93794

Immediate Actions Required

  • Identify all Linux systems using the in-kernel SMB client to access remote shares
  • Schedule kernel updates to a version that includes the upstream SMB client hole-punch flush fix
  • Validate critical workloads that combine buffered writes with hole-punch operations after patching

Patch Information

The fix is available in the upstream Linux kernel through commits 39562a56, 6c265aca, and d7d2adcd. The patch flushes and waits for dirty data in the punched range before invalidating the page cache and issuing FSCTL_SET_ZERO_DATA. Apply the stable kernel update provided by your Linux distribution vendor.

Workarounds

  • Avoid mixing large buffered writes with fallocate(FALLOC_FL_PUNCH_HOLE) operations on SMB-mounted files until the patch is applied
  • Issue an explicit fsync() on affected files before calling fpunch to force dirty pages to the server
  • Where feasible, use direct I/O (O_DIRECT) for workloads that depend on precise sparse-file layout semantics over SMB
bash
# Verify kernel version and plan an update that includes the SMB client fix
uname -r

# Reproduce the issue to confirm patch status on an SMB mount
xfs_io -f \
  -c "pwrite -b 3m -S 0x61 0 3m" \
  -c "fpunch 1m 1m" \
  -c "seek -h 0" \
  -c "seek -d 1m" \
  /mnt/test/repro

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.