ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-131 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 5.15.145 to before 5.15.203; 6.1.71 to before 6.1.168 | 5.15.203, 6.1.168 | Patch available | CNA |
| Linux | Linux | 6.6 and later | 5.15.203, 6.1.168, 6.6.131, 6.12.80, 6.18.21, 6.19.11, 7.0 | Patch available | CNA |
- Linux VendorLinux Affected 5.15.145 to before 5.15.203; 6.1.71 to before 6.1.168 Fixed in 5.15.203, 6.1.168 Patch available CNA
- Linux VendorLinux Affected 6.6 and later Fixed in 5.15.203, 6.1.168, 6.6.131, 6.12.80, 6.18.21, 6.19.11, 7.0 Patch available CNA
CPE configurations NVD · 9
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.145 to before 5.15.203; 6.1.71 to before 6.1.168; 6.6.1 to before 6.6.131; 6.7 to before 6.12.80; 6.13 to before 6.18.21; 6.19 to before 6.19.11 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.6:-:*:*:*:*:*:* | 6.6 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* | 7.0 rc1 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* | 7.0 rc2 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* | 7.0 rc3 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* | 7.0 rc4 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* | 7.0 rc5 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* | 7.0 rc6 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:* | 7.0 rc7 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 5.15.145 to before 5.15.203; 6.1.71 to before 6.1.168; 6.6.1 to before 6.6.131; 6.7 to before 6.12.80; 6.13 to before 6.18.21; 6.19 to before 6.19.11 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.6:-:*:*:*:*:*:* Versions 6.6 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* Versions 7.0 rc1 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* Versions 7.0 rc2 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* Versions 7.0 rc3 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* Versions 7.0 rc4 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* Versions 7.0 rc5 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* Versions 7.0 rc6 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:* Versions 7.0 rc7 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 5.15.203, 6.1.168
- Fix · CNA Linux (Linux) Fixed in 5.15.203, 6.1.168, 6.6.131, 6.12.80, 6.18.21, 6.19.11, 7.0
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
Not affected: 5 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2026-31478
- 2026-10-03 Alias added: GHSA-hjcf-h98x-x745
- 2026-10-16 CISA SSVC decision points changed
- 2026-10-19 Weakness changed · CISA ADP
- 2026-10-20 Affected versions changed · Red Hat
- 2026-10-25 EPSS moved to the below the 50th percentile
References
Patch 7
- 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
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2026-31478 · CVE Program
- CVE-2026-31478 · NVD
- FIRST EPSS
- GHSA-hjcf-h98x-x745 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-31478 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences