Skip to main content
Network Thinking Solutions Logo

CVE-2026-31478

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

All CVEs
CVE-2026-31478Published 4/22/2026

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

Vendor advisory
CVSS9.8Critical

Overview

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.

Published
4/22/2026
Last modified
11/11/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
linux kernel
linux
≥ 5.15.145, < 5.15.203

Verify advisory

Source
linux kernel
linux
≥ 6.1.71, < 6.1.168

Verify advisory

Source
linux kernel
linux
≥ 6.6.1, < 6.6.131

Verify advisory

Source
linux kernel
linux
≥ 6.7, < 6.12.80

Verify advisory

Source
linux kernel
linux
≥ 6.13, < 6.18.21

Verify advisory

Source
linux kernel
linux
≥ 6.19, < 6.19.11

Verify advisory

Source
linux kernel
linux
6.6

Verify advisory

Source
linux kernel
linux
7.0

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
Linux
Linux
≥ f2283680a80571ca82d710bc6ecd8f8beac67d63, < 70b4c414889492c522b6e4331562360f49be2361

Verify advisory

Source
Linux
Linux
≥ 9f297df20d93411c0b4ddad7f88ba04a7cd36e77, < 9a7166f0ef8cbb7bb48dd05e2471d995566003f5

Verify advisory

Source
Linux
Linux
≥ e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683

Verify advisory

Source
Linux
Linux
≥ e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 6aef1765d6807e0f027cd87f6ac973eb0879a46d

Verify advisory

Source
Linux
Linux
≥ e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 80824c7e527b70cf9039534e60aff592e8f209d1

Verify advisory

Source
Linux
Linux
≥ e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 4cb537ae4f37d7d0f617815ed4bed7173fb50861

Verify advisory

Source
Linux
Linux
≥ e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d, < 0e55f63dd08f09651d39e1b709a91705a8a0ddcb

Verify advisory

Source
Linux
Linux
≥ 5.15.145, < 5.15.203

Verify advisory

Source
Linux
Linux
≥ 6.1.71, < 6.1.168

Verify advisory

Source
Linux
Linux
6.6

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 9.8. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.