Skip to main content

Linux Kernel ksmbd EUVDEUVD-2026-26516

| CVE-2026-31707 HIGH
Out-of-bounds Write (CWE-787)
2026-05-01 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.1
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. Recon
    Gain local authenticated shell
  2. Delivery
    Identify ksmbd IPC channel
  3. Exploit
    Craft malicious daemon response
  4. Install
    Send oversized payload_sz or negative ngroups
  5. C2
    Trigger integer overflow in size validation
  6. Execute
    Bypass boundary check
  7. Impact
    Trigger out-of-bounds memcpy/kmemdup
  8. Step 8
    Information disclosure or kernel panic

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 local authenticated access to the Linux system with sufficient privileges to communicate with the ksmbd userspace daemon's IPC interface. Specifically, the attacker must be able to send crafted responses to the kernel ksmbd module through the /dev/ksmbd-control device or equivalent IPC mechanism, which typically requires membership in the ksmbd administrative group or CAP_SYS_ADMIN capability. The ksmbd kernel module must be loaded and actively handling SMB server operations. Exploitation is limited to systems where ksmbd is explicitly enabled (not the default configuration in most distributions, which use userspace Samba) and where the attacker has gained initial foothold with local shell access. Remote exploitation is not possible (AV:L in CVSS vector). Does not require user interaction (UI:N) and has low attack complexity (AC:L) once local access prerequisites are met.

Impact

Real-world exploitation risk is constrained by multiple factors despite the 7.1 CVSS score. Attack vector is local (AV:L) requiring authenticated access (PR:L) to the ksmbd daemon communication channel, limiting exposure to scenarios where attackers have shell access on systems running ksmbd. The EPSS score of 0.02% (5th percentile) indicates security researchers assess exploitation likelihood as very low, consistent with the lack of CISA KEV listing. No publicly available exploit code exists. CVSS vector shows high confidentiality and availability impact but requires low attack complexity, suggesting reliable exploitation is feasible once local access is obtained. However, ksmbd adoption remains limited compared to userspace Samba, reducing attack surface in production environments. The SSVC framework factors suggest exploitation is not currently observed, requires authentication (not automatable), and has localized technical impact. Priority should focus on systems with untrusted local users or containers sharing the host kernel where privilege escalation chains could leverage this primitive. The availability of vendor patches across all affected stable kernel branches (5.15.x, 6.12.x, 6.18.x, 7.0.x, 7.1-rc) significantly reduces risk for organizations maintaining current patch levels.

Exploit ScenarioDerived

An authenticated attacker with local shell access on a Linux system running ksmbd crafts malicious responses to the kernel's IPC validation function. By sending a LOGIN_REQUEST_EXT response with ngroups set to a large negative value (e.g., -1), the signed-to-unsigned conversion produces SIZE_MAX, which when multiplied by sizeof(gid_t) and added to the struct size, wraps to a small value matching the actual message buffer size. The validation check passes, and subsequent kmemdup in ksmbd_alloc_user trusts the corrupted ngroups value, triggering out-of-bounds memory access that could enable information disclosure from kernel memory or denial-of-service through kernel panic.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
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

Integer overflow in Linux kernel's ksmbd (SMB server) allows local authenticated attackers to bypass size validation and trigger memory corruption via crafted daemon responses. The vulnerability affects three IPC message handlers that fail to detect arithmetic overflow when computing expected message sizes from attacker-controlled fields (payload_sz, ngroups), enabling out-of-bounds memcpy operations. Vendor patches available for affected 5.15+ kernels. EPSS score 0.02% (5th percentile) indicates low observed exploitation probability. No CISA KEV listing or public exploit identified at time of analysis.

RemediationAI

Apply vendor-released kernel patches immediately for systems running ksmbd. Specific fixed versions: upgrade to Linux 6.12.84 or later for 6.12.x series (commit d6a6aa81eac2c9bff66dc6e191179cb69a14426b), 6.18.25+ for 6.18.x (commit 99c631d0366c1eab8fb188fe66425f4581ebdde4), 7.0.2+ for 7.0.x (commit 7dd0c858e1909769a4c91842724315ee74f1a5f1), or 7.1-rc1+ for mainline (commit 299db777ea0cfa5c407e41b045c24a14c034c27b). Patch references available at https://git.kernel.org/stable/c/[commit-hash]. If immediate patching is not feasible, disable ksmbd module via 'rmmod ksmbd' and fall back to userspace Samba, which provides equivalent SMB functionality without kernel attack surface - note this requires reconfiguring share definitions in /etc/samba/smb.conf and may impact performance for high-throughput file serving. Alternatively, restrict access to ksmbd management interface using AppArmor or SELinux policies to trusted administrative users only, reducing exposure to the local privilege requirement, though this does not eliminate risk from compromised admin accounts or container escapes. Verify ksmbd status with 'lsmod | grep ksmbd' and review /sys/module/ksmbd/parameters for active configurations.

Affected VersionsENISA

Linux patch: 7.1-rc1
Linux 0626e6641f6b467447c81dd7678a69c66f7746cf <7dd0c858e1909769a4c91842724315ee74f1a5f1
Linux patch: 6.12.84
Linux 0626e6641f6b467447c81dd7678a69c66f7746cf <d6a6aa81eac2c9bff66dc6e191179cb69a14426b
Linux 5.15
Linux 0626e6641f6b467447c81dd7678a69c66f7746cf <99c631d0366c1eab8fb188fe66425f4581ebdde4
Linux patch: 0
Linux patch: 6.18.25
Linux patch: 7.0.2
Linux 0626e6641f6b467447c81dd7678a69c66f7746cf <299db777ea0cfa5c407e41b045c24a14c034c27b

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 vulnerability exists in ksmbd's Inter-Process Communication validation layer (ipc_validate_msg function), which mediates between the kernel SMB server and userspace daemon. Three response handlers perform unsafe arithmetic on daemon-supplied unsigned 32-bit integers when calculating expected message sizes: RPC_REQUEST and SHARE_CONFIG_REQUEST add payload_sz to struct sizes without overflow detection, while LOGIN_REQUEST_EXT multiplies a signed ngroups field by sizeof(gid_t), converting negative values to SIZE_MAX before multiplication. When overflow produces a wrapped msg_sz that coincidentally equals the actual buffer size, validation passes and downstream consumers (memcpy at smb2pdu.c:6742, kmemdup in ksmbd_alloc_user) trust the unvalidated lengths. The fix introduces check_add_overflow() for addition operations and range-checks ngroups against [0, NGROUPS_MAX] before multiplication. This mirrors the request-side hardening in CVE-2025-aab98e2dbd64. Ksmbd was introduced in Linux 5.15 as an in-kernel SMB3 server implementation replacing the deprecated Samba kernel module.

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 7.1 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
SUSE HIGH
Red Hat MEDIUM

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

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

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

Lifecycle Timeline

4
CVSS changed
May 03, 2026 - 07:22 NVD
7.1 (HIGH)
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
HIGH 7.1

DescriptionCVE.org

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

ksmbd: validate response sizes in ipc_validate_msg()

ipc_validate_msg() computes the expected message size for each response type by adding (or multiplying) attacker-controlled fields from the daemon response to a fixed struct size in unsigned int arithmetic. Three cases can overflow:

KSMBD_EVENT_RPC_REQUEST: msg_sz = sizeof(struct ksmbd_rpc_command) + resp->payload_sz; KSMBD_EVENT_SHARE_CONFIG_REQUEST: msg_sz = sizeof(struct ksmbd_share_config_response) + resp->payload_sz; KSMBD_EVENT_LOGIN_REQUEST_EXT: msg_sz = sizeof(struct ksmbd_login_response_ext) + resp->ngroups * sizeof(gid_t);

resp->payload_sz is __u32 and resp->ngroups is __s32. Each addition can wrap in unsigned int; the multiplication by sizeof(gid_t) mixes signed and size_t, so a negative ngroups is converted to SIZE_MAX before the multiply. A wrapped value of msg_sz that happens to equal entry->msg_sz bypasses the size check on the next line, and downstream consumers (smb2pdu.c:6742 memcpy using rpc_resp->payload_sz, kmemdup in ksmbd_alloc_user using resp_ext->ngroups) then trust the unverified length.

Use check_add_overflow() on the RPC_REQUEST and SHARE_CONFIG_REQUEST paths to detect integer overflow without constraining functional payload size; userspace ksmbd-tools grows NDR responses in 4096-byte chunks for calls like NetShareEnumAll, so a hard transport cap is unworkable on the response side. For LOGIN_REQUEST_EXT, reject resp->ngroups outside the signed [0, NGROUPS_MAX] range up front and report the error from ipc_validate_msg() so it fires at the IPC boundary; with that bound the subsequent multiplication and addition stay well below UINT_MAX. The now-redundant ngroups check and pr_err in ksmbd_alloc_user() are removed.

This is the response-side analogue of aab98e2dbd64 ("ksmbd: fix integer overflows on 32 bit systems"), which hardened the request side.

Executive ViewAI

Why It Matters

CVE-2026-31707 is a local privilege escalation vulnerability in Linux kernel's ksmbd SMB server that allows authenticated users to corrupt kernel memory through integer overflow attacks, potentially enabling privilege escalation or denial of service on affected systems. Organizations running vulnerable kernel versions (5.15+) with ksmbd enabled should prioritize patching, particularly on systems where local user access is possible or where SMB services are exposed to untrusted networks.

Business Impact: High
Compensating Controls

Apply vendor patch. If patching cannot be completed immediately: (1) Disable ksmbd kernel module via echo 'blacklist ksmbd' >> /etc/modprobe.d/blacklist.conf if SMB server functionality is not required; (2) Restrict local user access via PAM/sudoers policies to limit authenticated attacker surface; (3) Monitor ksmbd-related syscalls and memory corruption events via auditd/SELinux; (4) Implement network segmentation to limit SMB exposure.

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% exploitable
Data Quality
6 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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
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
Small
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
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: High
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

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