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

CVE-2026-97561: Linux Kernel SMB Privilege Escalation Flaw

CVE-2026-97561 is a privilege escalation vulnerability in the Linux kernel SMB client that allows servers to override forced uid/gid mount options. This article covers technical details, affected versions, and mitigation.

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-97561 Overview

CVE-2026-97561 is a vulnerability in the Linux kernel SMB client that allows an untrusted SMB server to dictate local file ownership. The flaw occurs when administrators mount shares with the forceuid or forcegid options and expect all files to appear owned by the specified user or group. Several code paths unconditionally called sid_to_id() to overwrite cf_uid and cf_gid with server-provided Security Identifier (SID) values. This behavior ignored the administrator's explicit override, enabling a malicious server to influence local ownership mapping on client systems.

Critical Impact

A hostile SMB server can override administrator-enforced uid/gid mount policy, causing files to appear owned by attacker-chosen local users or groups.

Affected Products

  • Linux kernel SMB/CIFS client (fs/smb/client)
  • Mounts using the cifs or smb3 filesystem with forceuid or forcegid options
  • Distributions shipping unpatched upstream kernels

Discovery Timeline

  • 2026-09-25 - CVE-2026-97561 published to the National Vulnerability Database
  • 2026-09-28 - Last updated in NVD database

Technical Details for CVE-2026-97561

Vulnerability Analysis

The Linux kernel SMB client supports forceuid and forcegid mount options so administrators can present a consistent local ownership view regardless of what the remote server reports. The patched code honors CIFS_MOUNT_OVERR_UID and CIFS_MOUNT_OVERR_GID flags before calling sid_to_id(), matching the pattern already used by cifs_unix_basic_to_fattr() for Unix extensions. Prior to the fix, three code paths skipped this check and allowed server data to overwrite enforced identifiers. See the Linux Kernel Commit 18a7297 and Linux Kernel Commit e1b74f8 for the upstream fix.

Root Cause

Three functions overwrote cf_uid and cf_gid with values derived from server-supplied SIDs without consulting the mount's override flags. The affected call sites are smb311_posix_info_to_fattr() for stat via POSIX extensions, cifs_posix_to_fattr() for readdir via POSIX extensions, and parse_sec_desc() for CIFS Access Control List (ACL) ownership mapping.

Attack Vector

An attacker-controlled or compromised SMB server returns crafted SID values in POSIX info responses, directory enumeration data, or security descriptors. The client's sid_to_id() logic maps those SIDs to local uid or gid values and writes them into the file attribute structure. The mount's forceuid or forcegid policy is bypassed, and files appear owned by whatever identifiers the server selects. The vulnerability requires a user or administrator to mount a share from the malicious server.

Detection Methods for CVE-2026-97561

Indicators of Compromise

  • Files on CIFS/SMB mounts displaying ownership that contradicts the configured uid= or gid= mount options.
  • Unexpected uid or gid values appearing in ls -l or stat output on shares mounted with forceuid or forcegid.
  • Kernel audit records showing SMB mounts to untrusted or newly observed server endpoints.

Detection Strategies

  • Inventory running kernels and correlate versions against the patched commits referenced in the upstream advisory.
  • Audit /proc/mounts for CIFS/SMB entries using forceuid or forcegid and verify the resolved ownership matches policy.
  • Monitor for mounts to SMB servers outside sanctioned infrastructure, particularly from endpoints or servers that handle sensitive data.

Monitoring Recommendations

  • Collect endpoint telemetry on mount.cifs invocations and the resulting mount options.
  • Alert on file ownership changes within SMB-backed directory trees that deviate from baseline policy.
  • Forward kernel and auditd logs to a centralized analytics pipeline for correlation with network connections to SMB servers.

How to Mitigate CVE-2026-97561

Immediate Actions Required

  • Apply the upstream Linux kernel patches referenced by commits 18a72975e9f3 and e1b74f8f8c1d as soon as distribution updates are available.
  • Restrict SMB client connections to trusted, authenticated servers using network segmentation and firewall rules.
  • Review all production CIFS/SMB mounts to confirm forceuid and forcegid behavior aligns with expected ownership.

Patch Information

The fix updates smb311_posix_info_to_fattr(), cifs_posix_to_fattr(), and parse_sec_desc() to check CIFS_MOUNT_OVERR_UID and CIFS_MOUNT_OVERR_GID before calling sid_to_id(). Patched kernels are tracked in the Linux Kernel Commit 18a7297 and Linux Kernel Commit e1b74f8. Rebuild or update to a distribution kernel containing these commits.

Workarounds

  • Avoid mounting SMB shares from untrusted servers until the kernel is patched.
  • Where possible, use Unix extensions handled by cifs_unix_basic_to_fattr(), which already honors the override flags.
  • Enforce strict ACLs and least-privilege permissions on local directories that host SMB mount points.
bash
# Configuration example: verify mount options and resolved ownership
grep -E 'cifs|smb3' /proc/mounts
mount -t cifs //server/share /mnt/share -o uid=1000,gid=1000,forceuid,forcegid
stat -c '%U %G %n' /mnt/share/*

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.