CVE-2026-31478 in the critical feed json
ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
published 2026-04-22 6 mo ago modified 2026-10-19 20 d ago also EUVD-2026-24835
- cvss
- 9.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 43%
- public exploits
- 0
- none known
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.
Patch / fix
- Linux Linux 5.15.203, 6.1.168, 6.6.131, 6.12.80, 6.18.21, 6.19.11, 7.0
- linux Debian 12 6.1.170-1
- linux Debian 13 6.12.85-1
- linux Debian 14 6.19.11-1
debian advisories DEBIAN-CVE-2026-31478
- linux Ubuntu 22.04 LTS 5.15.0-185.195
- linux Ubuntu 24.04 LTS 6.8.0-134.134
- linux Ubuntu 25.10 6.17.0-40.40
- linux-aws Ubuntu 22.04 LTS 5.15.0-1111.118
- linux-aws Ubuntu 24.04 LTS 6.8.0-1060.63
- linux-aws Ubuntu 25.10 6.17.0-1019.19
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1111.121
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1063.69
ubuntu advisories UBUNTU-CVE-2026-31478
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git.kernel.org/stable/c/70b4c414889492c522b6e4331562360f49be2361 commit
- git.kernel.org/stable/c/9a7166f0ef8cbb7bb48dd05e2471d995566003f5 commit
- git.kernel.org/stable/c/c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683 commit
- git.kernel.org/stable/c/6aef1765d6807e0f027cd87f6ac973eb0879a46d commit
- git.kernel.org/stable/c/80824c7e527b70cf9039534e60aff592e8f209d1 commit
- git.kernel.org/stable/c/4cb537ae4f37d7d0f617815ed4bed7173fb50861 commit
- git.kernel.org/stable/c/0e55f63dd08f09651d39e1b709a91705a8a0ddcb commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-31478 updated
kernel: ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- total
- Assessed
- 24 d ago
Exploit prediction
0.50% chance of exploitation in the next 30 days, higher than 43% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-131 Incorrect Calculation of Buffer Size
- Technology feeds
References
-
git.kernel.org
/stable/c/70b4c414889492c522b6e4331562360f49be2361
patch
-
git.kernel.org
/stable/c/9a7166f0ef8cbb7bb48dd05e2471d995566003f5
patch
-
git.kernel.org
/stable/c/c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683
patch
-
git.kernel.org
/stable/c/6aef1765d6807e0f027cd87f6ac973eb0879a46d
patch
-
git.kernel.org
/stable/c/80824c7e527b70cf9039534e60aff592e8f209d1
patch
-
git.kernel.org
/stable/c/4cb537ae4f37d7d0f617815ed4bed7173fb50861
patch
-
git.kernel.org
/stable/c/0e55f63dd08f09651d39e1b709a91705a8a0ddcb
patch
Sources
- CVE List CVE-2026-31478
- NVD CVE-2026-31478
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.