CVE-2026-31478
published critical CVSS 3.1 · 9.8ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxf2283680a80571ca82d710bc6ecd8f8beac67d63 to < 70b4c414889492c522b6e4331562360f49be2361 · 9f297df20d93411c0b4ddad7f88ba04a7cd36e77 to < 9a7166f0ef8cbb7bb48dd05e2471d995566003f5 · e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683 · e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < 6aef1765d6807e0f027cd87f6ac973eb0879a46d · e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < 80824c7e527b70cf9039534e60aff592e8f209d1 · e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < 4cb537ae4f37d7d0f617815ed4bed7173fb50861 · e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < 0e55f63dd08f09651d39e1b709a91705a8a0ddcb · 5.15.145 to < 5.15.203 · 6.1.71 to < 6.1.168 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.6 (affected) · 0 to < 6.6 (unaffected · semver) · 5.15.203 through 5.15.* (unaffected · semver) · 6.1.168 through 6.1.* (unaffected · semver) · 6.6.131 through 6.6.* (unaffected · semver) · 6.12.80 through 6.12.* (unaffected · semver) · 6.18.21 through 6.18.* (unaffected · semver) · 6.19.11 through 6.19.* (unaffected · semver) · 7.0 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Debian | bookworm | linux | Advisory build | 6.1.170-1 | DSA-6243-1 |
| Ubuntu | bionic | linux | Advisory build | 4.15.0-254.266 | LSN-0121-1 |
| Debian | bullseye | linux-6.1 | Advisory build | 6.1.170-1~deb11u1 | DLA-4561-1 |
| Debian | trixie | linux | Advisory build | 6.12.85-1 | DSA-6238-1 |
Show 96 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Ubuntu | bionic | linux | Advisory build | 4.15.0-260.272 | LSN-0122-1 |
| Ubuntu | bionic | linux-aws | Advisory build | 4.15.0-1195.208 | LSN-0121-1 |
| Ubuntu | bionic | linux-aws | Advisory build | 4.15.0-1197.210 | LSN-0122-1 |
| Ubuntu | bionic | linux-azure-4.15 | Advisory build | 4.15.0-1205.220 | LSN-0121-1 |
| Ubuntu | bionic | linux-azure-4.15 | Advisory build | 4.15.0-1207.222 | LSN-0122-1 |
| Ubuntu | bionic | linux-gcp-4.15 | Advisory build | 4.15.0-1188.205 | LSN-0121-1 |
| Ubuntu | bionic | linux-gcp-4.15 | Advisory build | 4.15.0-1190.207 | LSN-0122-1 |
| Ubuntu | bionic | linux-hwe-5.4 | Advisory build | 5.4.0-234.254~18.04.1 | LSN-0121-1 |
| Ubuntu | bionic | linux-hwe-5.4 | Advisory build | 5.4.0-245.265~18.04.1 | LSN-0122-1 |
| Ubuntu | bionic | linux-oracle | Advisory build | 4.15.0-1158.169 | LSN-0121-1 |
| Ubuntu | bionic | linux-oracle | Advisory build | 4.15.0-1160.171 | LSN-0122-1 |
| Ubuntu | focal | linux | Advisory build | 5.4.0-234.254 | LSN-0121-1 |
| Ubuntu | focal | linux | Advisory build | 5.4.0-245.265 | LSN-0122-1 |
| Ubuntu | focal | linux-aws-5.15 | Advisory build | 5.15.0-1111.118~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-aws-5.15-cloud-tools-5.15.0-1111 | Advisory build | 5.15.0-1111.118~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-aws-5.15-headers-5.15.0-1111 | Advisory build | 5.15.0-1111.118~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-aws-5.15-tools-5.15.0-1111 | Advisory build | 5.15.0-1111.118~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-azure-5.15 | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-azure-5.15-cloud-tools-5.15.0-1116 | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-azure-5.15-headers-5.15.0-1116 | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-azure-5.15-tools-5.15.0-1116 | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-azure-fde-5.15 | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-azure-fde-5.15-cloud-tools-5.15.0-1116 | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-azure-fde-5.15-headers-5.15.0-1116 | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-azure-fde-5.15-tools-5.15.0-1116 | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1063-nvidia-tegra | Advisory build | 5.15.0-1063.63~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1063-nvidia-tegra-rt | Advisory build | 5.15.0-1063.63~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1105-ibm | Advisory build | 5.15.0-1105.109~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1106-intel-iotg | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1108-oracle | Advisory build | 5.15.0-1108.114~20.04.1 | USN-8493-2 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1111-aws | Advisory build | 5.15.0-1111.118~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1111-gcp | Advisory build | 5.15.0-1111.121~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1116-azure | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-1116-azure-fde | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-183-lowlatency | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-183-lowlatency-64k | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-185-generic | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-185-generic-64k | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-buildinfo-5.15.0-185-generic-lpae | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-1106-intel-iotg | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-1111-aws | Advisory build | 5.15.0-1111.118~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-1116-azure | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-1116-azure-fde | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-183-lowlatency | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-cloud-tools-5.15.0-185-generic | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-gcp-5.15 | Advisory build | 5.15.0-1111.121~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-gcp-5.15-headers-5.15.0-1111 | Advisory build | 5.15.0-1111.121~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-gcp-5.15-tools-5.15.0-1111 | Advisory build | 5.15.0-1111.121~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-headers-5.15.0-1063-nvidia-tegra | Advisory build | 5.15.0-1063.63~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-1063-nvidia-tegra-rt | Advisory build | 5.15.0-1063.63~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-1105-ibm | Advisory build | 5.15.0-1105.109~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-1106-intel-iotg | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-headers-5.15.0-1108-oracle | Advisory build | 5.15.0-1108.114~20.04.1 | USN-8493-2 |
| Ubuntu | focal | linux-headers-5.15.0-1111-aws | Advisory build | 5.15.0-1111.118~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-1111-gcp | Advisory build | 5.15.0-1111.121~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-headers-5.15.0-1116-azure | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-1116-azure-fde | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-183-lowlatency | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-183-lowlatency-64k | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-185-generic | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-185-generic-64k | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-headers-5.15.0-185-generic-lpae | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-hwe-5.15 | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-hwe-5.15-cloud-tools-5.15.0-185 | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-hwe-5.15-headers-5.15.0-185 | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-hwe-5.15-tools-5.15.0-185 | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-ibm-5.15 | Advisory build | 5.15.0-1105.109~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-ibm-5.15-headers-5.15.0-1105 | Advisory build | 5.15.0-1105.109~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-ibm-5.15-source-5.15.0 | Advisory build | 5.15.0-1105.109~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-ibm-5.15-tools-5.15.0-1105 | Advisory build | 5.15.0-1105.109~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-5.15.0-185-generic | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-5.15.0-185-generic-lpae | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1063-nvidia-tegra | Advisory build | 5.15.0-1063.63~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1063-nvidia-tegra-rt | Advisory build | 5.15.0-1063.63~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1105-ibm | Advisory build | 5.15.0-1105.109~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1106-intel-iotg | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1108-oracle | Advisory build | 5.15.0-1108.114~20.04.1 | USN-8493-2 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1111-aws | Advisory build | 5.15.0-1111.118~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1111-gcp | Advisory build | 5.15.0-1111.121~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1116-azure | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-1116-azure-fde | Advisory build | 5.15.0-1116.125~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-183-lowlatency | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-183-lowlatency-64k | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-185-generic | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-image-unsigned-5.15.0-185-generic-64k | Advisory build | 5.15.0-185.195~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-intel-iotg-5.15 | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-cloud-tools-5.15.0-1106 | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-cloud-tools-common | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-headers-5.15.0-1106 | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-tools-5.15.0-1106 | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-tools-common | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-intel-iotg-5.15-tools-host | Advisory build | 5.15.0-1106.112~20.04.1 | USN-8547-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15 | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-cloud-tools-5.15.0-183 | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-headers-5.15.0-183 | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
| Ubuntu | focal | linux-lowlatency-hwe-5.15-tools-5.15.0-183 | Advisory build | 5.15.0-183.193~20.04.1 | USN-8493-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.8 / 10
- Severity
- critical
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:N - The vulnerable code is in ksmbd SMB2 request handling reachable over TCP SMB connections, including normal network-facing port 445 deployments. AC:L - An attacker controls the SMB2 compound request layout, output buffer lengths, and command sequence needed to reach the miscalculation; no race or external timing condition is required. PR:N - The handlers run after SMB session/tree setup, but ksmbd supports guest/anonymous sessions and guest shares, so a reasonable deployment allows a remote attacker to reach the path without credentials. UI:N - No victim action is required after the ksmbd service is exposed; the attacker sends crafted SMB2 requests directly. S:U - The impact remains within the kernel/ksmbd security authority and does not cross a VM, IOMMU, or sandbox boundary. C:H - The bug can cause out-of-bounds kernel response-buffer memory corruption in compound SMB2 handling, which is defensibly treatable as exploitable memory corruption with potential information disclosure. I:H - The incorrect length calculation can permit an out-of-bounds write past the ksmbd response buffer, and kernel OOB writes are scored as high integrity impact. A:H - Even if not weaponized for code execution, the out-of-bounds kernel write can crash or oops the kernel, causing high availability impact.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | f2283680a80571ca82d710bc6ecd8f8beac67d63 to < 70b4c414889492c522b6e4331562360f49be2361 (affected · git)9f297df20d93411c0b4ddad7f88ba04a7cd36e77 to < 9a7166f0ef8cbb7bb48dd05e2471d995566003f5 (affected · git)e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683 (affected · git)e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < 6aef1765d6807e0f027cd87f6ac973eb0879a46d (affected · git)e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < 80824c7e527b70cf9039534e60aff592e8f209d1 (affected · git)e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < 4cb537ae4f37d7d0f617815ed4bed7173fb50861 (affected · git)e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to < 0e55f63dd08f09651d39e1b709a91705a8a0ddcb (affected · git)5.15.145 to < 5.15.203 (affected · semver)6.1.71 to < 6.1.168 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 6.6 (affected)0 to < 6.6 (unaffected · semver)5.15.203 through 5.15.* (unaffected · semver)6.1.168 through 6.1.* (unaffected · semver)6.6.131 through 6.6.* (unaffected · semver)6.12.80 through 6.12.* (unaffected · semver)6.18.21 through 6.18.* (unaffected · semver)6.19.11 through 6.19.* (unaffected · semver)7.0 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
1- CWE-131 CWE-131 Incorrect Calculation of Buffer Size
References
7- https://git.kernel.org/stable/c/0e55f63dd08f09651d39e1b709a91705a8a0ddcb
- https://git.kernel.org/stable/c/4cb537ae4f37d7d0f617815ed4bed7173fb50861
- https://git.kernel.org/stable/c/6aef1765d6807e0f027cd87f6ac973eb0879a46d
- https://git.kernel.org/stable/c/70b4c414889492c522b6e4331562360f49be2361
- https://git.kernel.org/stable/c/80824c7e527b70cf9039534e60aff592e8f209d1
- https://git.kernel.org/stable/c/9a7166f0ef8cbb7bb48dd05e2471d995566003f5
- https://git.kernel.org/stable/c/c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683
Provider assertions
2Linux · cna
ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 336805c0c77b7418d195810497e9d16e49e44e5bf8978180c39e6f836a8af31c
- Ingested
- 19 Oct 2026, 18:57:59 UTC
- Source record
- Official CVE record