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

CVE record · `CVE-2026-31478`

- **Identifiers:** `CVE-2026-31478`
- **State:** Confirmed
- **Severity:** CVSS 9.8 Critical
- **Critical:** Yes: CVSS 9+
- **CNA:** Linux
- **Weakness (CWE):** [CWE-131](https://cwe.mitre.org/data/definitions/131.html)
- **Tags:** [Memory corruption](https://agentprime.io/advisories/tag/memory-corruption.md)
- **Technologies:** [Linux kernel](https://agentprime.io/advisories/technology/linux-kernel.md)
- **Published:** 22 Apr 2026
- **Updated:** 19 Oct 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: Linux) at 22 Apr 2026, 13:54 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Critical

Critical, because:

- CVSS score 9.8: 9.0 or more.

How we decide what’s critical: <https://agentprime.io/advisories/critical.md>

## Affected products, as the CNA wrote them

- Vendor: Linux. Product: Linux.
  - affected: `f2283680a80571ca82d710bc6ecd8f8beac67d63 to before 70b4c414889492c522b6e4331562360f49be2361` (git)
  - affected: `9f297df20d93411c0b4ddad7f88ba04a7cd36e77 to before 9a7166f0ef8cbb7bb48dd05e2471d995566003f5` (git)
  - affected: `e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to before c3a89e3ec1ccf64fa6a34e391e1581ebbcba8683` (git)
  - affected: `e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to before 6aef1765d6807e0f027cd87f6ac973eb0879a46d` (git)
  - affected: `e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to before 80824c7e527b70cf9039534e60aff592e8f209d1` (git)
  - affected: `e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to before 4cb537ae4f37d7d0f617815ed4bed7173fb50861` (git)
  - affected: `e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d to before 0e55f63dd08f09651d39e1b709a91705a8a0ddcb` (git)
  - affected: `5.15.145 to before 5.15.203` (semver)
  - affected: `6.1.71 to before 6.1.168` (semver)
  - Other versions: unaffected
- Vendor: Linux. Product: Linux.
  - affected: `6.6`
  - unaffected: `before 6.6` (semver)
  - unaffected: `5.15.203 to 5.15.*, inclusive` (semver)
  - unaffected: `6.1.168 to 6.1.*, inclusive` (semver)
  - unaffected: `6.6.131 to 6.6.*, inclusive` (semver)
  - unaffected: `6.12.80 to 6.12.*, inclusive` (semver)
  - unaffected: `6.18.21 to 6.18.*, inclusive` (semver)
  - unaffected: `6.19.11 to 6.19.*, inclusive` (semver)
  - unaffected: `7.0 to *, inclusive` (original_commit_for_fix)
  - Other versions: affected

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

- 9.8 Critical, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`, from CNA (Linux)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0050, the 43rd percentile, on 18 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 22 Apr 2026, 14:16 UTC: [Confirmed by NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-31478)

## Sources

- [CVE List: CVE-2026-31478](https://www.cve.org/CVERecord?id=CVE-2026-31478)
- [NVD: CVE-2026-31478](https://nvd.nist.gov/vuln/detail/CVE-2026-31478)

### References from the CNA

- <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>

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2026-31478>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2026-31478/>. Everything for agents: <https://agentprime.io/llms.txt>.
