The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-31704

CVE-2026-31704: Linux Kernel Buffer Overflow Vulnerability

CVE-2026-31704 is a buffer overflow flaw in Linux Kernel's ksmbd module caused by u16 DACL size overflow in ACL processing. This article covers the technical details, affected versions, security impact, and mitigation.

Published: May 7, 2026

CVE-2026-31704 Overview

CVE-2026-31704 is an integer overflow vulnerability in the Linux kernel's ksmbd in-kernel SMB3 server. The flaw resides in the set_posix_acl_entries_dacl() and set_ntacl_dacl() functions within smbacl.c, which accumulate Access Control Entry (ACE) sizes in u16 variables. When a file carries many POSIX ACL entries, the accumulated size can wrap past 65535, causing pointer arithmetic to land within already-written ACEs and corrupt the discretionary access control list (DACL) buffer. The issue affects the Linux kernel on systems where ksmbd is enabled.

Critical Impact

A local authenticated attacker can trigger memory corruption in the kernel SMB server by crafting files with excessive POSIX ACL entries, leading to a denial-of-service condition.

Affected Products

  • Linux Kernel (multiple stable branches with ksmbd enabled)
  • Distributions shipping ksmbd as the in-kernel SMB server
  • Systems exposing SMB shares backed by filesystems with POSIX ACLs

Discovery Timeline

  • 2026-05-01 - CVE-2026-31704 published to NVD
  • 2026-05-06 - Last updated in NVD database

Technical Details for CVE-2026-31704

Vulnerability Analysis

The ksmbd module builds DACLs when responding to SMB security descriptor queries. Functions set_posix_acl_entries_dacl() and set_ntacl_dacl() walk the file's POSIX ACL entries and serialize each one as an ACE into an output buffer. During serialization, the running total of bytes written is tracked in a 16-bit unsigned integer (u16). Because each ACE consumes a non-trivial number of bytes, a sufficiently large set of ACL entries pushes the cumulative size beyond 0xFFFF, wrapping the counter to a small value [CWE-190].

Once the counter wraps, the next write computed as (char *)pndace + *size points back into earlier ACEs in the same buffer. Subsequent ACE writes overwrite previously serialized entries, and the final pndacl->size field is recorded with a truncated length. The corrupted DACL is then returned over SMB or used internally by the server.

Root Cause

The root cause is the use of an undersized integer type for size accumulation without overflow checking. The fix replaces unchecked addition with check_add_overflow() at every accumulation point, mirroring the existing check_mul_overflow() pattern already present elsewhere in smbacl.c. When overflow is detected, the function aborts cleanly instead of producing a malformed DACL.

Attack Vector

Exploitation requires local access and the ability to control file ACLs on a filesystem exported by ksmbd. An authenticated SMB user, or a local user able to set extended POSIX ACLs on a shared file, can stage a file with an extreme number of ACL entries. When ksmbd serializes the security descriptor, the overflow corrupts kernel memory adjacent to the DACL buffer, producing kernel panics or unpredictable behavior. The CVSS vector indicates local access with low privileges and high availability impact, with no confidentiality or integrity impact reported. The EPSS probability is 0.013%, reflecting the local prerequisite and absence of public exploit code.

No public proof-of-concept exists, and the vulnerability is not listed in the CISA KEV catalog.

Detection Methods for CVE-2026-31704

Indicators of Compromise

  • Kernel oops or panic traces referencing set_posix_acl_entries_dacl or set_ntacl_dacl in fs/smb/server/smbacl.c.
  • Unexpected ksmbd worker thread crashes or SMB session terminations on hosts with ksmbd loaded.
  • Files on exported shares carrying an unusually large number of POSIX ACL entries beyond typical administrative use.

Detection Strategies

  • Audit running kernel versions against the patched stable trees referenced in the kernel.org commits to identify unpatched hosts.
  • Inspect filesystems exported via ksmbd for files with abnormally large ACL counts using getfacl and flag outliers.
  • Monitor dmesg and journalctl -k for repeated ksmbd-related warnings, BUG entries, or memory corruption indicators.

Monitoring Recommendations

  • Forward kernel logs to a centralized logging or SIEM platform and alert on ksmbd stack traces.
  • Track SMB share availability and worker process restarts as a proxy signal for crash-based exploitation attempts.
  • Baseline ACL entry counts per share and alert on sudden growth that could indicate staging of an overflow payload.

How to Mitigate CVE-2026-31704

Immediate Actions Required

  • Apply the upstream kernel patches referenced in the Kernel Security Fix and companion commits to all affected stable branches.
  • Where patching is not immediately possible, unload the ksmbd module on hosts that do not require an in-kernel SMB server: modprobe -r ksmbd.
  • Restrict SMB share access to trusted authenticated users and remove write/ACL-modification rights from untrusted accounts.

Patch Information

The Linux kernel maintainers fixed the issue by introducing check_add_overflow() calls at each ACE size accumulation point in smbacl.c. The corresponding stable backports are available at Kernel Patch Details, Kernel Commit Changes, Kernel Code Update, Kernel Security Fix, and Kernel Improvement Commit. Distribution vendors are issuing rebased kernels through their normal advisory channels.

Workarounds

  • Migrate SMB services from ksmbd to user-space Samba (smbd) until patched kernels are deployed.
  • Disable POSIX ACL support on filesystems exported via ksmbd where ACLs are not required.
  • Block SMB ports (445/tcp, 139/tcp) from untrusted networks at the host firewall to limit exposure of the affected code path.

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechLinux Kernel

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • NVD-CWE-noinfo
  • Vendor Resources
  • Kernel Patch Details

  • Kernel Commit Changes

  • Kernel Code Update

  • Kernel Security Fix

  • Kernel Improvement Commit
  • Related CVEs
  • CVE-2026-43330: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-43337: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-43341: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-43350: Linux Kernel Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English