CVE-2026-31709 Overview
CVE-2026-31709 is a Linux kernel vulnerability in the SMB (Server Message Block) client code that handles cifsacl security descriptor processing. The flaw resides in build_sec_desc() and id_mode_to_cifs_acl(), which derive a Discretionary Access Control List (DACL) pointer from a server-supplied dacloffset and rebuild the chmod/chown security descriptor without sufficient structural validation. A malicious SMB server can return a truncated DACL whose header claims one or more Access Control Entries (ACEs), driving the rewrite helpers past the validated extent. The vulnerability affects the Linux kernel SMB client and was resolved by introducing a shared validate_dacl() helper used by both read-side and write-side paths.
Critical Impact
A malicious SMB server can trigger out-of-bounds memory access in the Linux kernel client during chmod or chown operations, potentially leading to memory corruption, information disclosure, or denial of service.
Affected Products
- Linux Kernel (SMB client subsystem, cifsacl mount option)
- Distributions shipping vulnerable kernel versions prior to the fix commits
- Systems mounting SMB/CIFS shares with cifsacl enabled
Discovery Timeline
- 2026-05-01 - CVE-2026-31709 published to NVD
- 2026-05-07 - Last updated in NVD database
Technical Details for CVE-2026-31709
Vulnerability Analysis
The vulnerability exists in the Linux kernel SMB client's handling of incoming DACL structures returned by a remote server. The functions build_sec_desc() and id_mode_to_cifs_acl() use a server-supplied dacloffset value to locate a DACL within the security descriptor buffer, then iterate ACEs based on the pdacl->num_aces field. An earlier fix validated only that the struct smb_acl header fits within the buffer before reading dacl_ptr->size or dacl_ptr->num_aces. That partial fix prevented header-field out-of-bounds reads but did not validate the DACL body. The rewrite helpers replace_sids_and_copy_aces() and set_chmod_dacl() continued to walk ACEs without checking each entry against the actual buffer extent.
Root Cause
The root cause is incomplete input validation [CWE-noinfo] of attacker-controlled SMB protocol data. The kernel trusted the num_aces count without verifying that each ACE structure fits within the DACL bounds. A truncated DACL containing a valid header but missing ACE bodies bypassed bounds checking during the chmod and chown rebuild paths.
Attack Vector
An attacker who controls or impersonates an SMB server can craft a malicious response containing a security descriptor with a truncated DACL. When a Linux client mounts the share with the cifsacl option and performs chmod or chown operations, the kernel parses the malicious DACL and reads or copies attacker-controlled bytes past the validated extent. Exploitation requires user interaction in the form of accessing the malicious share, consistent with the network-based attack profile of this vulnerability.
The vulnerability manifests during ACE iteration in the rewrite helpers. See the upstream patch commits for technical details on the structural checks added in validate_dacl().
Detection Methods for CVE-2026-31709
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing cifs, smb, build_sec_desc, id_mode_to_cifs_acl, replace_sids_and_copy_aces, or set_chmod_dacl
- Kernel log entries showing memory access faults during SMB chmod or chown operations
- Connections from Linux clients to untrusted or unexpected SMB servers, particularly with cifsacl mount options
- Anomalous SMB traffic patterns where servers return malformed security descriptors
Detection Strategies
- Monitor dmesg and /var/log/kern.log for crashes or warnings originating in the fs/smb/client/cifsacl.c code path
- Inspect mount tables for cifsacl usage and correlate with destination server reputation
- Capture SMB session traffic and validate DACL structural integrity in security descriptor responses
- Track kernel version inventory across the fleet and flag hosts running unpatched kernel builds
Monitoring Recommendations
- Audit mount.cifs invocations and SMB client mount events through endpoint telemetry
- Alert on outbound SMB connections to non-corporate destinations from Linux servers and workstations
- Correlate kernel crash dumps with SMB activity windows to identify exploitation attempts
- Maintain centralized syslog collection for kernel messages from all CIFS client hosts
How to Mitigate CVE-2026-31709
Immediate Actions Required
- Apply the upstream kernel patches referenced in the Kernel Patch Proposal and Kernel Commit Notice once available in your distribution
- Inventory all Linux hosts mounting SMB shares with the cifsacl option
- Restrict SMB client connections to trusted, authenticated servers within the organization
- Update to the latest stable kernel release containing the validate_dacl() fix
Patch Information
The fix factors DACL structural checks into a new validate_dacl() helper that validates each ACE against DACL bounds. The parse_dacl() read path and the chmod/chown write paths now share the same validator, ensuring consistent enforcement. See the Kernel Change Announcement for the upstream commit details.
Workarounds
- Mount SMB shares without the cifsacl option until the patch is deployed, falling back to standard POSIX permission emulation
- Block outbound SMB traffic (TCP 445) to untrusted networks at the host or perimeter firewall
- Restrict SMB client mounts to specific allow-listed servers using firewall rules or network segmentation
- Disable automatic mounting of SMB shares via autofs or systemd unit files where feasible
# Configuration example: remove cifsacl from /etc/fstab entries
# Before:
# //server/share /mnt/share cifs credentials=/etc/smb.cred,cifsacl 0 0
# After:
//server/share /mnt/share cifs credentials=/etc/smb.cred,noperm 0 0
# Verify current kernel version
uname -r
# Block outbound SMB to non-trusted ranges (example with iptables)
iptables -A OUTPUT -p tcp --dport 445 -d 0.0.0.0/0 -j DROP
iptables -I OUTPUT -p tcp --dport 445 -d 10.0.0.0/8 -j ACCEPT
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


