CVE-2026-64354

bpf: Validate BTF repeated field counts before expansion

State
Published
Severity
7.8 High
Published
Jul 25, 2026
Updated
Oct 19, 2026
Reserved
Jul 19, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

  • CWE-190 Integer Overflow or Wraparound

Affected Products

ProductVersions
LinuxLinux
  • 797d73ee232dd1833dec4824bc53a22032e97c1c to before c5ff816d5f13900c3f1f3298cfcc61339e056e56Affected
  • 797d73ee232dd1833dec4824bc53a22032e97c1c to before cd407de2ef5dc70f1970b343ffaa16186340fdfdAffected
  • 797d73ee232dd1833dec4824bc53a22032e97c1c to before ff77d013b737c0f77d925e2f2c59f0cf3d76bd35Affected
  • 797d73ee232dd1833dec4824bc53a22032e97c1c to before b9452b594fd3aecbfd4aa0a6a1f741330a37dab7Affected
  • 6f957d972feee9b385ea3ae6530310a84e55ba71Affected
  • 6.11.6 to before 6.12Affected
LinuxLinux
  • 6.12Affected
  • before 6.12Not affected
  • 6.12.96 through 6.12.*Not affected
  • 6.18.39 through 6.18.*Not affected
  • 7.1.4 through 7.1.*Not affected
  • 7.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.