LiveActive security incident?Get immediate response
CVE Record

CVE-2026-31478: ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()

In the Linux kernel, the following vulnerability has been resolved: ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len() After this commit (e2b76ab8b5c9 "ksmbd: add support for read compound"), response buffer management was changed to use dynamic iov array. In the new design, smb2_calc_max_out_buf_len() expects the second argument (hdr2_len) to be the offset of ->Buffer field in the response structure, not a hardcoded magic number. Fix the remaining call sites to use the correct offsetof() value.

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

A flaw in Linux’s in-kernel SMB server, ksmbd, can miscalculate response-buffer limits because some code uses a fixed header length instead of the response structure’s actual buffer offset. The supplied CVSS rates potential confidentiality, integrity, and availability impact as high.

Executive priority

Treat exposed ksmbd servers as an urgent patching priority because the supplied rating is critical and requires no privileges or user interaction. Do not interpret that rating as proof of exploitation. Confirm service use and vendor package status immediately; schedule other affected internal systems through accelerated remediation.

Technical view

Following dynamic response-iovec changes for compound reads, smb2_calc_max_out_buf_len() expects hdr2_len to represent the response structure’s Buffer-field offset. Remaining callers supplied hardcoded values. Stable-kernel patches replace those values with offsetof(). The supplied sources do not describe the resulting memory fault, trigger conditions, or exploit primitive.

Likely exposure

Exposure is limited to systems running affected Linux kernels where ksmbd is enabled. Network-reachable SMB services deserve first attention because the supplied CVSS describes unauthenticated, low-complexity network attackability. The affected-version data includes multiple maintained kernel lines, but package applicability must be confirmed with the system’s distribution vendor.

Exploitation context

The supplied record is not in KEV and provides no evidence of active exploitation or a public proof of concept. CVSS 9.8 indicates severe theoretical remote impact, but the sources do not document a demonstrated attack path. Treat internet- or untrusted-network-accessible ksmbd servers as urgent pending vendor confirmation.

Researcher notes

The record identifies an API-contract mismatch in response-length calculation rather than a fully characterized vulnerability mechanism. No CWE, malformed-request details, crash evidence, memory-corruption classification, proof of concept, or exploitation telemetry is supplied. Researchers should avoid inferring code execution solely from the CVSS impacts.

Mitigation direction

  • Inventory systems where ksmbd is enabled and identify their exact kernel packages.
  • Prioritize ksmbd services reachable from internet or untrusted networks.
  • Apply a vendor-supported kernel update incorporating the relevant stable fix.
  • If no update is available, obtain supported mitigation guidance from the distribution vendor.

Validation and detection

  • Confirm whether ksmbd is enabled on each potentially affected host.
  • Compare installed kernel packages with vendor-provided affected and fixed versions.
  • Verify the relevant stable fix appears in package changelogs or kernel source.
  • After updating, confirm the intended kernel is running and SMB service functionality remains healthy.
Prepared
Confidence
medium
Sources
9

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-31478 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
8Source 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-31478Attack 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
LinuxLinuxf2283680a80571ca82d710bc6ecd8f8beac67d63, 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, 5.15.145, 6.1.71unaffected
LinuxLinux6.6, 0, 5.15.203, 6.1.168, 6.6.131, 6.12.80, 6.18.21, 6.19.11, 7.0affected
Weakness

CWE details

No CWE listed

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