LiveActive security incident?Get immediate response
CVE Record

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

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.

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

A flaw in Linux’s ksmbd SMB server can let an unauthenticated network client overwrite adjacent kernel memory. Successful triggering could crash the system or threaten data confidentiality and integrity. The issue is rated critical at CVSS 9.8, although the supplied sources do not establish active exploitation.

Executive priority

Treat network-reachable ksmbd systems as an urgent patching priority, especially where SMB is exposed beyond trusted administrative networks. First establish whether ksmbd is actually in use, then deploy vendor-supported fixed kernels through an accelerated change process.

Technical view

In smb2_get_ea(), value bounds are checked before copying, but 4-byte alignment padding is written without verifying remaining space. A compound SMB response can leave an exact-sized remainder, causing a 1–3-byte NUL overwrite beyond the kvmalloc buffer into adjacent kernel heap memory.

Likely exposure

Potential exposure is limited to systems running an affected Linux kernel with ksmbd enabled and reachable by untrusted clients. The supplied version data contains ambiguous entries and commit identifiers, so organizations should confirm exposure using distribution-specific kernel advisories and build information.

Exploitation context

The bundle marks KEV false and provides no evidence of active exploitation or a public exploit. CVSS describes network access, low complexity, no privileges, and no user interaction; these are severity characteristics, not proof of reliable exploitation.

Researcher notes

The overwrite is only 1–3 NUL bytes but reaches adjacent kernel heap memory when compound replies leave a tight buffer. The bundle identifies related prior bug patterns, but supplies no CWE, proof of concept, exploitation analysis, or clear branch-by-branch fixed-version mapping.

Mitigation direction

  • Prioritize a vendor-supported kernel update containing the referenced ksmbd bounds-check fix.
  • Check Linux distribution advisories for exact fixed package versions before deployment.
  • Disable ksmbd where SMB service is unnecessary, following approved operational procedures.
  • Restrict SMB access to trusted networks until affected systems are patched.

Validation and detection

  • Inventory kernel versions and builds on systems providing SMB through ksmbd.
  • Confirm whether ksmbd is enabled, loaded, and reachable over the network.
  • Verify installed kernels include a referenced fix or vendor-confirmed backport.
  • Review kernel logs for ksmbd crashes or memory-corruption symptoms; no specific indicators are supplied.
Prepared
Confidence
medium
Sources
8

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2026-31705 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
0ADP providers
7Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9Linux

Vulnerability scoring details

Base CVSS 3.1 score

9.8Critical
CVSS 3.1 vector shape for CVE-2026-31705Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux9f297df20d93411c0b4ddad7f88ba04a7cd36e77, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, f2283680a80571ca82d710bc6ecd8f8beac67d63, 6.1.71, 5.15.145unaffected
LinuxLinux6.6, 0, 6.1.175, 6.6.136, 6.12.84, 6.18.25, 7.0.2, 7.1affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.