Security Resilience

CVE-2026-31478

Linux Kernel 5.15.145 – 5.15.203

Published
22 April 2026
Modified
19 October 2026
Patch / advisory
CVSS Score v3.1 9.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0050 43th percentile
Risk Priority 72 floored blend · peak EPSS

CVSS 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

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

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-53091Same product: Linux Linux Kernel
CVE-2026-64039Same product: Linux Linux Kernel
CVE-2024-43843Same product: Linux Linux Kernel
CVE-2026-43107Same product: Linux Linux Kernel
CVE-2026-43302Same product: Linux Linux Kernel
CVE-2024-42259Same product: Linux Linux Kernel
CVE-2024-26721Same product: Linux Linux Kernel
CVE-2026-53366Same product: Linux Linux Kernel
CVE-2024-46684Same product: Linux Linux Kernel
CVE-2025-71286Same product: Linux Linux Kernel

Affected Assets

linux
linux kernel
6.6, 7.0 · 5.15.145 — 5.15.203 · 6.1.71 — 6.1.168 · 6.6.1 — 6.6.131

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.

PR.PS-06 mostly match
blocks

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.

prevents

Secure coding standards directly require correct buffer-size calculations.

finds

Security testing can detect buffer-size errors before release.

References