CVE-2026-31707
Chainguard vulnerability analysis and mitigation

Overview

CVE-2026-31707 is an integer overflow vulnerability in the Linux kernel's ksmbd (kernel SMB daemon) IPC message validation function ipc_validate_msg(). Attacker-controlled fields from daemon responses — specifically payload_sz (__u32) and ngroups (__s32) — are used in unsigned integer arithmetic that can wrap around, bypassing size checks and causing downstream kernel code to trust unverified payload lengths. Affected Linux kernel versions span 5.15 through 6.12 (fixed in 6.12.84), 6.13 through 6.18 (fixed in 6.18.25), and 6.19 and later (fixed in 7.0.2). It was published on May 1, 2026, and carries a CVSS v3.1 base score of 7.1 (High) (Red Hat Advisory, Red Hat Bugzilla).

Technical details

The root cause is an incorrect calculation of buffer size (CWE-131) leading to out-of-bounds write (CWE-787) in ipc_validate_msg(). Three event types are vulnerable: KSMBD_EVENT_RPC_REQUEST and KSMBD_EVENT_SHARE_CONFIG_REQUEST compute msg_sz by adding a __u32 payload_sz to a fixed struct size in unsigned int arithmetic, which can wrap; KSMBD_EVENT_LOGIN_REQUEST_EXT multiplies a __s32 ngroups by sizeof(gid_t), where a negative ngroups is implicitly converted to SIZE_MAX before the multiply. A wrapped msg_sz that coincidentally equals entry->msg_sz bypasses the size check, and downstream consumers — a memcpy in smb2pdu.c:6742 using rpc_resp->payload_sz and a kmemdup in ksmbd_alloc_user using resp_ext->ngroups — then operate on the unverified lengths. The fix applies check_add_overflow() for the RPC and share config paths, and enforces a signed [0, NGROUPS_MAX] range check for ngroups before any arithmetic (Red Hat Bugzilla, Kernel Patch).

Impact

A local user with low privileges who can interact with the ksmbd daemon can craft malformed IPC response messages that bypass size validation, triggering out-of-bounds kernel memory writes via memcpy and kmemdup. This can result in high confidentiality impact (kernel memory disclosure) and high availability impact (kernel crash or instability), with no integrity impact per the CVSS assessment. Successful exploitation could escalate to kernel code execution, enabling full system compromise (Red Hat Advisory, Red Hat Bugzilla).

Exploitability

As of the time of publication, there is no known public proof-of-concept exploit and no evidence of in-the-wild exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.018% (0.000180), indicating a very low probability of exploitation in the near term. Exploitation requires local access with low privileges, limiting the attack surface compared to remotely exploitable vulnerabilities (Red Hat Advisory).

Mitigation and workarounds

Update to a patched Linux kernel version: 6.12.84 or later for the 5.15–6.12 branch, 6.18.25 or later for the 6.13–6.18 branch, or 7.0.2 or later for the 6.19+ branch. Patches are available via the upstream kernel stable tree. If immediate upgrade is not possible, consider disabling the ksmbd module (modprobe -r ksmbd) on systems where SMB kernel serving is not required. Monitor kernel changelogs for the specific commits implementing check_add_overflow() validation and ngroups range restrictions (Red Hat Advisory, Kernel Patch).

Community reactions

Red Hat has tracked this vulnerability via Bugzilla (Bug 2464366) and assigned it a medium severity rating. The upstream fix was referenced in the linux-cve-announce mailing list and the Yocto Project security mailing list has issued multiple advisories covering this CVE. No notable independent researcher commentary or significant social media discussion has been identified beyond standard CVE tracking (Red Hat Bugzilla).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

linux

Affected

sid

linux: 7.0.3-1

Fixed

trixie

linux: 6.12.85-1

Fixed

Ubuntu

Fixed

bionic

linux

Not Affected

bionic (esm-infra)

linux

Not Affected

bionic (fips-updates)

linux-fips

Not Affected

bionic (fips)

linux-fips

Not Affected

devel

linux-aws: 7.2.0-1001.1

Affected

focal

linux

Not Affected

focal (esm-infra)

linux-hwe-5.15

Affected

focal (fips-updates)

linux-fips

Not Affected

RHEL / CentOS

Affected

RHEL 8

Not Affected

RHEL 9

Not Affected

RHEL 10

Not Affected

SourceThis report was generated using AI

Related Chainguard vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-86175HIGH7.1
  • Chainguard logoChainguard
  • netbox
NoNoSep 05, 2026
CVE-2026-86116HIGH7.1
  • Metabase logoMetabase
  • cpe:2.3:a:metabase:metabase
NoYesSep 05, 2026
CVE-2026-86144MEDIUM5.6
  • Wolfi logoWolfi
  • seal-libxml2
NoYesSep 05, 2026
CVE-2026-86176MEDIUM5.3
  • Chainguard logoChainguard
  • netbox
NoNoSep 05, 2026
CVE-2026-84445HIGHN/A
  • Chainguard logoChainguard
  • cluster-api-fips-1.13
NoYesSep 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management