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-31478

CVE-2026-31478: Linux Kernel ksmbd Buffer Vulnerability

CVE-2026-31478 is a buffer management flaw in the Linux kernel ksmbd component affecting response buffer handling. This post covers the technical details, affected versions, security impact, and mitigation.

Published: April 23, 2026

CVE-2026-31478 Overview

A vulnerability has been identified in the Linux kernel's ksmbd (kernel SMB server) component where hardcoded header length values in the smb2_calc_max_out_buf_len() function lead to incorrect buffer management. Following changes to support read compound operations (commit e2b76ab8b5c9), the response buffer management was redesigned to use a dynamic iov array. However, certain call sites continued using hardcoded magic numbers instead of the correct offsetof() values for the ->Buffer field offset in response structures.

Critical Impact

Improper buffer length calculations in the SMB2 protocol handler could lead to memory corruption or information disclosure when processing SMB2 requests on Linux systems running ksmbd.

Affected Products

  • Linux kernel with ksmbd module enabled
  • Systems using in-kernel SMB3 file server (ksmbd)
  • Linux distributions with ksmbd configurations

Discovery Timeline

  • 2026-04-22 - CVE CVE-2026-31478 published to NVD
  • 2026-04-23 - Last updated in NVD database

Technical Details for CVE-2026-31478

Vulnerability Analysis

The vulnerability exists in the ksmbd module's buffer length calculation logic. After the introduction of dynamic iov array support for read compound operations (commit e2b76ab8b5c9), the smb2_calc_max_out_buf_len() function expects the second argument (hdr2_len) to represent the offset of the ->Buffer field in the SMB2 response structure. However, several call sites were not updated to use the proper offsetof() macro and continued passing hardcoded numeric values.

This mismatch between expected and actual parameter semantics can result in incorrect buffer size calculations. When the calculated buffer length is incorrect, it may lead to buffer overruns when writing response data or premature truncation of legitimate responses.

Root Cause

The root cause stems from an incomplete code migration following architectural changes to the ksmbd response buffer management system. When dynamic iov arrays were introduced for read compound support, the function interface contract changed but not all calling code was updated to reflect this new expectation. The use of hardcoded "magic numbers" instead of proper structure offsets via offsetof() creates a fragile dependency that breaks when structure layouts change.

Attack Vector

An attacker with network access to a system running ksmbd could potentially craft malicious SMB2 requests that trigger the vulnerable code path. The incorrect buffer calculations could be exploited during SMB2 compound read operations where the miscalculated buffer length leads to memory corruption or information leakage in the kernel response buffer handling.

The vulnerability requires the target system to have ksmbd enabled and accepting SMB connections. Exploitation complexity depends on the specific kernel version and configuration, as well as the exact nature of the buffer calculation error in each call site.

Detection Methods for CVE-2026-31478

Indicators of Compromise

  • Unexpected ksmbd kernel module crashes or panics during SMB2 operations
  • Anomalous SMB2 compound read requests from untrusted network sources
  • Memory corruption warnings or kernel oops messages related to ksmbd
  • Unusual network traffic patterns targeting SMB/CIFS ports (445/tcp)

Detection Strategies

  • Monitor kernel logs for ksmbd-related warnings, errors, or crash reports
  • Implement network intrusion detection rules for malformed SMB2 compound requests
  • Use kernel debugging tools to detect buffer overflows in ksmbd module
  • Track SMB2 connection patterns for anomalous compound read operations

Monitoring Recommendations

  • Enable kernel auditing for ksmbd module operations and errors
  • Configure network monitoring on SMB ports to detect exploitation attempts
  • Set up alerting for kernel panics or unexpected ksmbd module behavior
  • Review system logs regularly for signs of SMB-based attack patterns

How to Mitigate CVE-2026-31478

Immediate Actions Required

  • Update the Linux kernel to a patched version containing the fix
  • If patching is not immediately possible, consider disabling ksmbd if not required
  • Restrict network access to SMB services to trusted hosts only
  • Monitor systems for signs of exploitation attempts

Patch Information

Multiple kernel patches have been released to address this vulnerability by replacing hardcoded header length values with proper offsetof() calculations. The fixes ensure that smb2_calc_max_out_buf_len() receives the correct offset values for the ->Buffer field in SMB2 response structures.

Patches are available from the Linux kernel stable tree:

  • Kernel Git Commit 0e55f63
  • Kernel Git Commit 4cb537a
  • Kernel Git Commit 6aef176
  • Kernel Git Commit 70b4c41
  • Kernel Git Commit 80824c7
  • Kernel Git Commit 9a71666
  • Kernel Git Commit c3a89e3

Workarounds

  • Disable the ksmbd kernel module if SMB server functionality is not required: modprobe -r ksmbd
  • Use firewall rules to restrict SMB access to trusted networks only
  • Consider using userspace Samba instead of ksmbd until patches are applied
  • Implement network segmentation to isolate systems running ksmbd
bash
# Disable ksmbd module and prevent loading
echo "blacklist ksmbd" >> /etc/modprobe.d/ksmbd-blacklist.conf
modprobe -r ksmbd

# Restrict SMB access via firewall (iptables example)
iptables -A INPUT -p tcp --dport 445 -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 445 -j DROP

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechLinux Kernel

  • SeverityNONE

  • CVSS ScoreN/A

  • EPSS Probability0.03%

  • Known ExploitedNo
  • Impact Assessment
  • ConfidentialityNone
  • IntegrityNone
  • AvailabilityNone
  • Technical References
  • Kernel Git Commit 0e55f63

  • Kernel Git Commit 4cb537a

  • Kernel Git Commit 6aef176

  • Kernel Git Commit 70b4c41

  • Kernel Git Commit 80824c7

  • Kernel Git Commit 9a71666

  • Kernel Git Commit c3a89e3
  • Related CVEs
  • CVE-2026-31744: Linux Kernel NULL Pointer Vulnerability

  • CVE-2026-31746: Linux Kernel Memory Leak Vulnerability

  • CVE-2026-31752: Linux Kernel ND Option Vulnerability

  • CVE-2026-31738: Linux Kernel VXLAN Option Validation Flaw
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