KernelScan.io

CRITICAL Introduced in 3.7

smb CreateContext OOB

CVE-2026-98454

CVSS 9.1 / 10.0 KernelScan AI

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

01

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix create context out-of-bounds reads smb2_parse_contexts() validates the complete create-context area but does not limit each record to its Next field before dispatching it. A malformed chain can therefore expose bytes beyond the current context to a handler. The QFid handler also used a full response-structure cast although it only reads DiskFileId. The SMB2/SMB3 lease parsers made the same layout assumption: they read LeaseState and LeaseFlags at canonical offsets rather than at DataOffset. A valid non-canonical DataOffset could therefore yield unrelated in-bounds data, while a short DataLength was still accepted. Limit each context to its Next value, reject offsets before the context header, and reject malformed chains. Bound the name range by the current context and do not dispatch a known handler when DataLength is zero. Read the QFid DiskFileId only when the context data covers that field. Parse the lease context from DataOffset and require DataLength to match the v1 or v2 lease_context size used by ksmbd. A size mismatch skips lease parsing without failing the open.

02

Engine v0.9.0

Risk summary

A malicious SMB2/SMB3 server can send a crafted create response with malformed context chains that cause the kernel SMB client to read beyond the allocated response buffer. This allows an unauthenticated remote attacker to leak kernel memory and potentially crash the kernel, requiring only that the victim mounts a share or connects to the malicious server.

Affectedfs/smb/client/smb2pdu.c, fs/smb/client/smb2ops.c (SMB client)

Vulnerability analysis

The SMB client's create context parser checks the overall response buffer but does not verify boundaries for each individual context in the chain. A malicious server can send a response where a context's chain pointer extends past its own data, or where data offset and length fields point outside the context, causing the lease and query-ID handlers to read adjacent kernel memory. The fix enforces strict per-context length limits from the chain pointer, validates all offsets and lengths against that limit, requires the data length to match the expected lease structure size before parsing, and only calls known handlers when data is present. The flaw can be triggered from any network location where the victim connects to an attacker-controlled SMB server, without requiring local privileges or user interaction beyond the connection attempt.

03

BranchIntroducedFixed inPatch commit
6.123.76.12.11228bc9a871799
6.183.76.18.5505a7fd80024f
6.63.76.6.158e4c49012708c
7.23.77.2.9cecc5399987e
mainline3.77.367f4c1c6a1b5
cip/6.123.76.12.112-cip3328bc9a871799

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.112-cip33
cip/6.1Affected — no CIP fix yet (latest 6.1.189-cip61)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.271-cip78)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.268-cip77-rt34)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)