smb: client: fix create context out-of-bounds reads
Affects the Linux kernel SMB client, which parses SMB2 create contexts in server responses, in releases before 6.6.158, 6.12.112, 6.18.55 and 7.2.9 on their branches. Fixed in those releases.
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Specific setups only
- Fix
- Fixed in 6.6.158, 6.12.112, 6.18.55, 7.2.9
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
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.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
Version range not reported
- Linux Linux
3.7
- KernelLinux
From 3.7.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.55; From 6.19.0 · fixed in 7.2.9
References 8
git.kernel.org
- stable/c/34245048d6c1fa6d7be4f0dec1d14b5be02360e1
- stable/c/0a8c2a6715c2a67b7abbbf874fccc9f5518146d9
- stable/c/43d0ca48bb902d554b6531862248810d2ae3b8ef
- stable/c/e4c49012708c917eafd9c27054b02d0f8b30fe64
- stable/c/28bc9a871799363afa3139e961a8e3684feb8704
- stable/c/05a7fd80024ff32b9b40ab1478bb172eeab1c386
- stable/c/cecc5399987e73a528ce2b662eeb54af69163cbd
- stable/c/67f4c1c6a1b51e203d986779299824d1c2c590a6
Questions about CVE-2026-98454
What does this mean?
A malformed chain of SMB2 create contexts can cause the kernel SMB client to read bytes beyond the current context and pass them to a handler. The flaw is an out-of-bounds read.Source: git.kernel.org
Am I affected, and how do I check?
Kernel releases from 3.7.0 up to 6.6.158, from 6.7.0 up to 6.12.112, from 6.13.0 up to 6.18.55, and from 6.19.0 up to 7.2.9 are listed as affected. Check the running kernel with uname -r, and check whether the SMB client module is in use.Source: git.kernel.org
Is it being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data