CVE-2026-31478
ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()
Check your servers for CVE-2026-31478
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31478 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.52%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 45.7% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 16 Oct 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-131 Incorrect Calculation of Buffer Size
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from f2283680a80571ca82d710bc6ecd8f8beac67d63, before 70b4c414889492c522b6e4331562360f49be2361 affected from 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, before 9a7166f0ef8cbb7bb48dd05e2471d995566003f5 affected from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, before c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683 affected from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, before 6aef1765d6807e0f027cd87f6ac973eb0879a46d affected from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, before 80824c7e527b70cf9039534e60aff592e8f209d1 affected from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, before 4cb537ae4f37d7d0f617815ed4bed7173fb50861 affected from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, before 0e55f63dd08f09651d39e1b709a91705a8a0ddcb affected from 5.15.145, before 5.15.203 affected from 6.1.71, before 6.1.168
Other versions: unaffected
|
| Linux |
affected 6.6 unaffected before 6.6 unaffected from 5.15.203 up to and including 5.15.* unaffected from 6.1.168 up to and including 6.1.* unaffected from 6.6.131 up to and including 6.6.* unaffected from 6.12.80 up to and including 6.12.* unaffected from 6.18.21 up to and including 6.18.* unaffected from 6.19.11 up to and including 6.19.* unaffected 7.0 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31478 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31478
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-31478
trivy image --scanners vuln IMAGE | grep CVE-2026-31478
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/70b4c414889492c522b6e4331562360f49be2361 git.kernel.org
- https://git.kernel.org/stable/c/9a7166f0ef8cbb7bb48dd05e2471d995566003f5 git.kernel.org
- https://git.kernel.org/stable/c/c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683 git.kernel.org
- https://git.kernel.org/stable/c/6aef1765d6807e0f027cd87f6ac973eb0879a46d git.kernel.org
- https://git.kernel.org/stable/c/80824c7e527b70cf9039534e60aff592e8f209d1 git.kernel.org
- https://git.kernel.org/stable/c/4cb537ae4f37d7d0f617815ed4bed7173fb50861 git.kernel.org
- https://git.kernel.org/stable/c/0e55f63dd08f09651d39e1b709a91705a8a0ddcb git.kernel.org
Source: the record CVE-2026-31478 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse