CVE-2026-31478
ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
Mitigation
- Upgrade Linux to 6.1.168 or later.
Who should check
- Anyone running Linux >= f2283680a80571ca82d710bc6ecd8f8beac67d63, < 70b4c414889492c522b6e4331562360f49be2361; >= 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, < 9a7166f0ef8cbb7bb48dd05e2471d995566003f5; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 6aef1765d6807e0f027cd87f6ac973eb0879a46d; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 80824c7e527b70cf9039534e60aff592e8f209d1; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 4cb537ae4f37d7d0f617815ed4bed7173fb50861; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 0e55f63dd08f09651d39e1b709a91705a8a0ddcb; >= 5.15.145, < 5.15.203; >= 6.1.71, < 6.1.168
- Anyone running Linux 6.6
Vulnerability facts
- Affected
- Linux >= f2283680a80571ca82d710bc6ecd8f8beac67d63, < 70b4c414889492c522b6e4331562360f49be2361; >= 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, < 9a7166f0ef8cbb7bb48dd05e2471d995566003f5; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 6aef1765d6807e0f027cd87f6ac973eb0879a46d; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 80824c7e527b70cf9039534e60aff592e8f209d1; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 4cb537ae4f37d7d0f617815ed4bed7173fb50861; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 0e55f63dd08f09651d39e1b709a91705a8a0ddcb; >= 5.15.145, < 5.15.203; >= 6.1.71, < 6.1.168; Linux 6.6
- Fixed in
- Linux 70b4c414889492c522b6e4331562360f49be2361, Linux 9a7166f0ef8cbb7bb48dd05e2471d995566003f5, Linux 6aef1765d6807e0f027cd87f6ac973eb0879a46d, Linux 80824c7e527b70cf9039534e60aff592e8f209d1, Linux 4cb537ae4f37d7d0f617815ed4bed7173fb50861, Linux 0e55f63dd08f09651d39e1b709a91705a8a0ddcb, Linux 5.15.203, Linux 6.1.168
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.77% chance of exploitation in 30 days (percentile 52, 2026-11-26)
- CWE
- CWE-131
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= f2283680a80571ca82d710bc6ecd8f8beac67d63, < 70b4c414889492c522b6e4331562360f49be2361; >= 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, < 9a7166f0ef8cbb7bb48dd05e2471d995566003f5; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 6aef1765d6807e0f027cd87f6ac973eb0879a46d; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 80824c7e527b70cf9039534e60aff592e8f209d1; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 4cb537ae4f37d7d0f617815ed4bed7173fb50861; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 0e55f63dd08f09651d39e1b709a91705a8a0ddcb; >= 5.15.145, < 5.15.203; >= 6.1.71, < 6.1.168 | — | cvelist |
| Linux | 6.6 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-31478. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-31478.md Affected: Linux >= f2283680a80571ca82d710bc6ecd8f8beac67d63, < 70b4c414889492c522b6e4331562360f49be2361; >= 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, < 9a7166f0ef8cbb7bb48dd05e2471d995566003f5; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683; >= e2b76ab8b5c9327ab2dae6d… Fixed in: Linux 70b4c414889492c522b6e4331562360f49be2361, Linux 9a7166f0ef8cbb7bb48dd05e2471d995566003f5, Linux 6aef1765d6807e0f027cd87f6ac973eb0879a46d, Linux 80824c7e527b70cf9039534e60aff592e8f209d1, Linux 4cb537ae4f37d7d0f617815ed4bed7173fb50861, Linux 0e55f63dd08f09651d39e1b709a91705a8a0ddcb, Linux 5.15.… Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/70b4c414889492c522b6e4331562360f49be2361
- https://git.kernel.org/stable/c/9a7166f0ef8cbb7bb48dd05e2471d995566003f5
- https://git.kernel.org/stable/c/c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683
- https://git.kernel.org/stable/c/6aef1765d6807e0f027cd87f6ac973eb0879a46d
- https://git.kernel.org/stable/c/80824c7e527b70cf9039534e60aff592e8f209d1
- https://git.kernel.org/stable/c/4cb537ae4f37d7d0f617815ed4bed7173fb50861
- https://git.kernel.org/stable/c/0e55f63dd08f09651d39e1b709a91705a8a0ddcb
FAQ
Is CVE-2026-31478 being exploited?
There is no confirmed exploitation: CVE-2026-31478 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.77% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-31478?
Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2026-31478?
Linux >= f2283680a80571ca82d710bc6ecd8f8beac67d63, < 70b4c414889492c522b6e4331562360f49be2361; >= 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, < 9a7166f0ef8cbb7bb48dd05e2471d995566003f5; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 6aef1765d6807e0f027cd87f6ac973eb0879a46d; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 80824c7e527b70cf9039534e60aff592e8f209d1; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 4cb537ae4f37d7d0f617815ed4bed7173fb50861; >= e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 0e55f63dd08f09651d39e1b709a91705a8a0ddcb; >= 5.15.145, < 5.15.203; >= 6.1.71, < 6.1.168; Linux 6.6.
Is there a fix for CVE-2026-31478?
Yes. Fixed in Linux 70b4c414889492c522b6e4331562360f49be2361, Linux 9a7166f0ef8cbb7bb48dd05e2471d995566003f5, Linux 6aef1765d6807e0f027cd87f6ac973eb0879a46d, Linux 80824c7e527b70cf9039534e60aff592e8f209d1, Linux 4cb537ae4f37d7d0f617815ed4bed7173fb50861, Linux 0e55f63dd08f09651d39e1b709a91705a8a0ddcb, Linux 5.15.203, Linux 6.1.168. Upgrade Linux to 6.1.168 or later.
How do I check if I'm affected by CVE-2026-31478?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.