CVE-2026-64354

bpf: Validate BTF repeated field counts before expansion

Published Jul 25, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

This vulnerability is a classic integer overflow that leads to an out‑of‑bounds write. A malformed BTF descriptor can cause an overflow when calculating the number of expanded fields, bypassing the capacity check performed by btf_parse_struct_metas(). The unchecked calculation allows the memcpy that copies repeated fields into a fixed‑size scratch array to write past the end of the array. This out‑of‑bounds write can corrupt kernel memory, potentially enabling an attacker who can load a BPF program to escape to higher privilege or crash the system.

Affected Systems

The flaw resides in the Linux kernel’s BPF runtime. Linux kernel 6.12 and its release candidates rc4 through rc7, as well as all kernels that include BTF loading via the BPF_BTF_LOAD interface, are affected. The patch is applied at the kernel source level and will be included in future releases; affected systems must update to a kernel version that contains the btf_repeat_fields fix.

Risk and Exploitability

The CVSS score is 7.8. The EPSS score is reported as less than 1%, indicating a low probability of exploitation at this time, and the vulnerability is not listed in the CISA KEV catalog. However, the vulnerability provides a direct memory corruption path that could allow local privilege escalation if an attacker can supply crafted BTF data. The attack vector is inferred to be local, requiring the ability to load a BPF program with the BPF_BTF_LOAD command. Successful exploitation could lead to kernel memory corruption, privilege escalation, or system crash.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that includes the btf_repeat_fields fix
  • If immediate kernel upgrade is not possible, restrict the BPF_BTF_LOAD capability to trusted users or disable the BTF loading interface altogether
  • Apply package vendor updates through your distribution’s security tooling to ensure the patched kernel is installed
  • Monitor for any anomalous BPF activity and apply kernel hardening patches such as address space layout randomization (ASLR) and memlock limits

Generated by OpenCVE AI on October 20, 2026 at 13:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
Ubuntu USN Ubuntu USN USN-8726-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8727-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8760-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-2 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-3 Linux kernel (IBM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8800-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8760-2 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-190
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:o:linux:linux_kernel:6.12:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.12:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.12:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.12:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.12:rc7:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-680
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-680
CWE-787
Type Values Removed Values Added
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.
Title bpf: Validate BTF repeated field counts before expansion
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 8:38 PM
Reserved
Jul 19, 2026, 3:36 PM
Status
Modified
Published
Jul 25, 2026, 10:17 AM
Modified
Oct 19, 2026, 9:17 PM
Severity
Moderate
Public date
Jul 25, 2026, 12:00 AM