VDB

CVE-2026-31478

CVE-2026-31478 PUBLISHED CVSS 9.8 CRITICAL

ksmbd: replace hardcoded hdr2_len with offsetof() in smb2_calc_max_out_buf_len()

Reported by linux · Published April 22, 2026

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.

Risk scores

CVSS 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

VendorProductVersions
LinuxLinuxf2283680a80571ca82d710bc6ecd8f8beac67d63, 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d
LinuxLinux6.6, 0, 5.15.203
LinuxLinux6.1.71, 6.6.131, 6.12.80
linuxlinux_kernel6.6, 6.6, 6.6

Timeline

  • Apr 22, 2026 CVE Published
  • Apr 22, 2026 PoC Published
  • Apr 23, 2026 Security Advisory (97 in total, the first dated here)
  • May 18, 2026 EPSS Score (30 in total, the first dated here)
  • Jul 16, 2026 Coalition ESS Score
  • Aug 6, 2026 CVE Updated
  • Aug 11, 2026 Distribution Patch (92 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-31478
vulnetix vdb fixes CVE-2026-31478

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31478/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›