Vulnerability · Published Apr 22, 2026 · Assigned by Linux
CVE-2026-31478ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
Critical 9.8
In plain English
A critical-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 43% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.170-1 | DEBIAN-CVE-2026-31478 |
| Debian:13 | linux | 6.12.85-1 | DEBIAN-CVE-2026-31478 |
| Debian:14 | linux | 6.19.11-1 | DEBIAN-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux | 5.15.0-185.195 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux | 5.15.0-185.195 | USN-8493-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-134.134 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux | 6.17.0-40.40 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux | 6.17.0-40.40 | USN-8490-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1111.118 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1111.118 | USN-8493-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1060.63 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-aws | 6.17.0-1019.19 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-aws | 6.17.0-1019.19 | USN-8490-1 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-aws-6.17 | 6.17.0-1019.19~24.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-aws-6.17 | 6.17.0-1019.19~24.04.1 | USN-8490-1 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1060.63~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1116.125 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1116.125 | USN-8493-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1063.71 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-azure | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-azure-6.17 | 6.17.0-1021.21~24.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1063.71~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1116.125 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1062.69 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | 6.8.0-1062.69~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1111.121 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1111.121 | USN-8493-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1063.69 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-gcp | 6.17.0-1020.22 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-gcp | 6.17.0-1020.22 | USN-8490-1 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-gcp-6.17 | 6.17.0-1020.22~24.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-gcp-6.17 | 6.17.0-1020.22~24.04.1 | USN-8490-1 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1063.69~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1107.113 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1107.113 | USN-8493-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1058.64 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1094.102 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1094.102 | USN-8493-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1045.48 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-hwe-6.17 | 6.17.0-40.40~24.04.1 | USN-8545-1 |
| Ubuntu:24.04:LTS | linux-hwe-6.17 | 6.17.0-40.40~24.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-136.136~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1105.109 | USN-8493-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1105.109 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1060.61 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1060.61~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1106.112 | USN-8493-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1106.112 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1103.108 | USN-8493-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1103.108 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-183.193 | USN-8493-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-183.193 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-134.134.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-134.134.1~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1106.107 | USN-8493-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1106.107 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1058.61 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-nvidia-6.17 | 6.17.0-1026.26 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-nvidia-6.17 | 6.17.0-1026.26 | USN-8508-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1058.61~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1058.61.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1063.63 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1063.63 | USN-8493-1 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1029.30 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1052.52 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1052.52 | USN-8493-1 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-oem-6.17 | 6.17.0-1028.28 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-oem-6.17 | 6.17.0-1028.28 | USN-8491-1 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1108.114 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1108.114 | USN-8493-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1057.58 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-oracle | 6.17.0-1018.18 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-oracle | 6.17.0-1018.18 | USN-8490-1 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-oracle-6.17 | 6.17.0-1018.18~24.04.1 | USN-8490-1 |
| Ubuntu:24.04:LTS | linux-oracle-6.17 | 6.17.0-1018.18~24.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1057.58~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1105.108 | USN-8527-1 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1105.108 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1060.64 | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-raspi | 6.17.0-1021.21 | USN-8546-1 |
| Ubuntu:25.10 | linux-raspi | 6.17.0-1021.21 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-realtime | 6.17.0-1017.19 | USN-8490-2 |
| Ubuntu:25.10 | linux-realtime | 6.17.0-1017.19 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:25.10 | linux-riscv | 6.17.0-40.40.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-riscv-6.17 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-134.134~22.04.1 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-vmware | 6.8.0-1008.8 | UBUNTU-CVE-2026-31478 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1032.33 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1074.78 | UBUNTU-CVE-2026-31478 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1074.78 | USN-8528-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | f2283680a80571ca82d710bc6ecd8f8beac67d63 – before 70b4c414889492c522b6e4331562360f49be23619f297df20d93411c0b4ddad7f88ba04a7cd36e77 – before 9a7166f0ef8cbb7bb48dd05e2471d995566003f5e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d – before c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d – before 6aef1765d6807e0f027cd87f6ac973eb0879a46de2b76ab8b5c9327ab2dae6da05d0752eb2f4771d – before 80824c7e527b70cf9039534e60aff592e8f209d1e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d – before 4cb537ae4f37d7d0f617815ed4bed7173fb50861e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d – before 0e55f63dd08f09651d39e1b709a91705a8a0ddcb5.15.145 – before 5.15.203 |
| Linux | Linux | 6.6 |
Weakness: CWE-131 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- 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