Skip to main content

Linux kernel ksmbd CVE-2026-31705

| EUVDEUVD-2026-26514 CRITICAL
Out-of-bounds Write (CWE-787)
2026-05-01 416baaa9-dc9f-4396-8d5f-8c081fb06d67
9.8
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send SMB2 compound request
  2. Delivery
    First command consumes buffer space
  3. Exploit
    QUERY_INFO EA request exhausts remainder
  4. Execution
    smb2_get_ea() alignment memset overflows
  5. Persist
    Corrupt adjacent kernel heap structures
  6. Impact
    Escalate to arbitrary kernel code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires target system running Linux kernel with ksmbd module loaded and SMB service listening on network-accessible interface (default ports 445 or 139). The vulnerable code path activates when processing SMB2 QUERY_INFO requests for extended attributes (EAs) within compound request structures where the shared response buffer has constrained remaining space. Specifically, exploitation requires: (1) ksmbd server configured to serve shares with extended attribute support; (2) attacker ability to send crafted SMB2 compound requests (no authentication required per CVSS PR:N); (3) precise calculation of EA value sizes to exhaust buf_free_len boundaries after preceding commands in the compound chain; (4) heap layout conditions allowing valuable kernel structures adjacent to response buffer allocation for meaningful corruption. Limiting factors include ksmbd's relatively uncommon deployment compared to Samba, requirement for exposed SMB service to untrusted networks, and need for heap manipulation expertise to convert memory corruption into reliable exploitation. Default Linux installations do not load ksmbd unless explicitly configured.

Impact

CVSS vector (AV:N/AC:L/PR:N/UI:N) indicates network-accessible exploitation without authentication or user interaction, yielding the maximum 9.8 severity score with high impact across confidentiality, integrity, and availability. However, real-world risk assessment reveals significant gaps between theoretical and practical threat: (1) EPSS probability of 0.02% (5th percentile) suggests security researchers and attackers have not prioritized this vulnerability despite public disclosure; (2) exploitation requires ksmbd module loaded and SMB service exposed to untrusted networks-ksmbd is not default-enabled in most distributions and deployment is far less common than Samba userspace implementation; (3) triggering requires crafted compound SMB2 requests with precisely sized EA queries to exhaust buffer boundaries, indicating AC:L may overstate ease of exploitation; (4) successful exploitation yields kernel heap corruption but reliable code execution requires heap feng shui techniques and KASLR/SMEP bypass on modern kernels; (5) no CISA KEV listing and no public POC identified indicate absence of confirmed active exploitation campaigns. While the vulnerability merits patching due to memory safety implications in kernel context, operational urgency depends heavily on whether ksmbd is deployed-environments using Samba userspace server or not exposing SMB externally face negligible real-world risk. Priority should focus on internet-facing ksmbd deployments serving untrusted clients.

Exploit ScenarioDerived

An unauthenticated remote attacker crafts a compound SMB2 request targeting a Linux server running ksmbd with network-accessible SMB service. The request chains a large READ operation to consume most of the shared response buffer, followed by a QUERY_INFO command requesting extended attributes with a value size calculated to exactly exhaust the remaining buf_free_len. The smb2_get_ea() function processes the EA, writes the value via memcpy, then unconditionally executes alignment memset() writing 1-3 NUL bytes into adjacent kernel heap memory. By repeating with controlled heap state manipulation, the attacker corrupts kernel structures (e.g., function pointers, credentials) adjacent to the kvmalloc'd buffer, achieving arbitrary code execution in kernel context with full system privileges. No public POC currently identified, but attack is theoretically feasible given network access and detailed SMB2 protocol knowledge.

Act Now Prioritize within 24-48h. Why: Active threat signals + CRITICAL/HIGH severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 03, 2026

Out-of-bounds write in Linux kernel's ksmbd SMB server allows memory corruption when processing extended attributes (EA) in QUERY_INFO responses. The smb2_get_ea() function performs 4-byte alignment padding without checking remaining buffer space, causing 1-3 bytes to write past allocation boundaries when EA values exactly fill the response buffer. This occurs in compound SMB2 requests where shared response buffers are tightly constrained. EPSS score of 0.02% suggests minimal observed exploitation activity, though the CVSS 9.8 critical rating reflects the theoretical network-accessible, unauthenticated attack surface. Vendor patches available across multiple stable kernel branches (6.6.136, 6.12.84, 7.0.2, 7.1-rc1). Not listed in CISA KEV. This represents the third instance of the same vulnerability pattern in ksmbd QUERY_INFO handlers, following fixes in commits beef2634f81f and fda9522ed6af.

RemediationAI

Apply vendor-released kernel patches immediately for systems with ksmbd enabled: upgrade to Linux 6.6.136+ (stable 6.6.x branch), 6.12.84+ (stable 6.12.x), 6.18.25+ (stable 6.18.x), 7.0.2+ (stable 7.0.x), or 7.1-rc1+ (mainline). Patches available at https://git.kernel.org/stable/c/98f3de6ef4efbd899348d333f0902dc4ff14380c (6.6 series), https://git.kernel.org/stable/c/922d48fe8c19f388ffa2f709f33acaae4e408de2, https://git.kernel.org/stable/c/790304c02bf9bd7b8171feda4294d6e62d32ae8f, https://git.kernel.org/stable/c/ffbce350c6fd1e99116ea57383b9031717e36d3b, and https://git.kernel.org/stable/c/30010c952077a1c89ecdd71fc4d574c75a8f5617. If immediate patching is not feasible, disable ksmbd module via 'rmmod ksmbd' and prevent autoloading by blacklisting in /etc/modprobe.d/blacklist.conf with 'blacklist ksmbd'-this eliminates attack surface entirely with trade-off of losing in-kernel SMB server functionality (migrate to Samba userspace as alternative). If ksmbd must remain active, restrict network access via firewall rules limiting SMB ports 445/139 to trusted management networks only-reduces exposure but does not prevent exploitation from allowed networks. Verify ksmbd status via 'lsmod | grep ksmbd' and check listening ports via 'ss -tlnp | grep 445'.

Affected VersionsENISA

Linux e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d <98f3de6ef4efbd899348d333f0902dc4ff14380c
Linux e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d <922d48fe8c19f388ffa2f709f33acaae4e408de2
Linux 9f297df20d93411c0b4ddad7f88ba04a7cd36e77
Linux patch: 6.6.136
Linux patch: 7.0.2
Linux patch: 0
Linux patch: 6.18.25
Linux f2283680a80571ca82d710bc6ecd8f8beac67d63
Linux e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d <790304c02bf9bd7b8171feda4294d6e62d32ae8f
Linux patch: 7.1-rc1
Linux patch: 6.12.84
Linux 6.6
Linux e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d <30010c952077a1c89ecdd71fc4d574c75a8f5617
Linux e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d <ffbce350c6fd1e99116ea57383b9031717e36d3b

Affected Packages

euvd linux no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The ksmbd subsystem is an in-kernel SMB2/3 server implementation for Linux, allowing network file sharing via the SMB protocol. The vulnerability resides in smb2_get_ea() within the extended attribute handling code path, specifically when constructing QUERY_INFO responses for EA queries. SMB2 protocol requires 4-byte alignment for EA entries, enforced via memset() padding after each entry's value field. The function checks buf_free_len before memcpy() of the EA value but unconditionally executes the alignment memset() regardless of remaining space. In compound SMB2 requests-where multiple operations share a single response buffer allocated via kvmalloc-a preceding command (e.g., READ) can consume most of the buffer allocation. When the subsequent QUERY_INFO EA response uses the remainder and an EA value exactly exhausts buf_free_len, the alignment write accesses unallocated heap memory adjacent to the kvmalloc'd region. This buffer overflow pattern has recurred in ksmbd's QUERY_INFO handlers, indicating systematic issues with bounds validation in SMB response construction code.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
SUSE CRITICAL

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
CVSS changed
May 03, 2026 - 07:22 NVD
9.8 (CRITICAL)
Patch released
May 03, 2026 - 07:16 nvd
Patch available
Patch available
May 01, 2026 - 15:02 EUVD
CVE Published
May 01, 2026 - 14:16 nvd
CRITICAL 9.8

DescriptionCVE.org

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix out-of-bounds write in smb2_get_ea() EA alignment

smb2_get_ea() applies 4-byte alignment padding via memset() after writing each EA entry. The bounds check on buf_free_len is performed before the value memcpy, but the alignment memset fires unconditionally afterward with no check on remaining space.

When the EA value exactly fills the remaining buffer (buf_free_len == 0 after value subtraction), the alignment memset writes 1-3 NUL bytes past the buf_free_len boundary. In compound requests where the response buffer is shared across commands, the first command (e.g., READ) can consume most of the buffer, leaving a tight remainder for the QUERY_INFO EA response. The alignment memset then overwrites past the physical kvmalloc allocation into adjacent kernel heap memory.

Add a bounds check before the alignment memset to ensure buf_free_len can accommodate the padding bytes.

This is the same bug pattern fixed by commit beef2634f81f ("ksmbd: fix potencial OOB in get_file_all_info() for compound requests") and commit fda9522ed6af ("ksmbd: fix OOB write in QUERY_INFO for compound requests"), both of which added bounds checks before unconditional writes in QUERY_INFO response handlers.

Executive ViewAI

Why It Matters

Linux systems running vulnerable ksmbd SMB server versions are exposed to unauthenticated remote memory corruption through malformed SMB2 requests, potentially enabling denial of service or code execution without authentication. This critical vulnerability affects file servers and network storage appliances using affected kernel versions; immediate patching is essential to eliminate network-accessible attack surface, even though current exploitation activity remains minimal.

Business Impact: High
Compensating Controls

Apply vendor patch. If immediate patching is not feasible: disable ksmbd SMB server if not required for business operations; restrict SMB network access (ports 139, 445) to trusted subnets only using firewall rules; monitor SMB traffic for malformed QUERY_INFO requests; implement network segmentation to isolate affected file servers.

Threat Intelligence Overview

Threat Score
4.0/10
Composite threat intelligence
EPSS Score
0.0%
Top 95% exploitable
Threat Intel
2
1 sources
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat Yes
Deciding rule
Active threat signals + CRITICAL/HIGH severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: +10
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Availability Extension 15 SP7 Fixed
SUSE Linux Enterprise High Availability Extension 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed

Threat IntelligenceMISP

CISA Advisories
Security News Coverage
Sources: Security News RSS, Microsoft MSRC, CISA (public domain)

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy