CVE-2026-31478
Linux Kernel 5.15.145 – 5.15.203
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS scores by FIRST (EPSS SIG), generated by Empirical Security. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2026-31478 is a critical-severity Incorrect Calculation of Buffer Size (CWE-131) vulnerability in Linux Kernel. Its CVSS base score is 9.8 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 43th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2026-31478 is a vulnerability in the Linux kernel's ksmbd module, which implements SMB server functionality. The issue arises in the smb2_calc_max_out_buf_len() function, where a hardcoded hdr2_len value is used instead of the correct offsetof() macro to calculate the offset of the ->Buffer field in response structures. This bug was introduced after commit e2b76ab8b5c9, which updated response buffer management to use a dynamic iov array for read compound support, and it affects call sites that were not updated accordingly.
The vulnerability has a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), indicating it is exploitable over the network with low complexity, no privileges or user interaction required. A remote unauthenticated attacker can leverage flawed buffer length calculations in ksmbd's SMB2 response handling to achieve high-impact confidentiality, integrity, and availability effects, potentially leading to remote code execution or system compromise on affected kernel instances exposing the SMB service.
Mitigation requires updating to a patched Linux kernel version incorporating the fix. Relevant stable kernel patches are available at git.kernel.org, including commits such as 0e55f63dd08f09651d39e1b709a91705a8a0ddcb, 4cb537ae4f37d7d0f617815ed4bed7173fb50861, 6aef1765d6807e0f027cd87f6ac973eb0879a46d, 70b4c414889492c522b6e4331562360f49be2361, and 80824c7e527b70cf9039534e60aff592e8f209d1.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-24835
Vulnerability Data
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…
more
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.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices directly prevent buffer-size miscalculations via coding standards, reviews, and testing, while fixing this single weakness only partially fulfills the broader control.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Secure coding standards directly require correct buffer-size calculations.
Security testing can detect buffer-size errors before release.