In the Linux kernel, the following vulnerability has been resolved: bpf: Validate BTF repeated field counts before expansion… (CVE-2026-64354)
A vulnerability in the Linux kernel related to BPF (Berkeley Packet Filter) BTF (BPF Type Format) handling has been resolved. The issue involves improper validation of repeated field counts during BTF expansion, which can cause a buffer overflow via memcpy() when processing malformed BTF data. This occurs because the calculation of expanded field counts can wrap around in 32-bit arithmetic, bypassing capacity checks. The fix involves using checked arithmetic to prevent overflow and rejecting invalid counts.
AI Analysis
Technical Summary
The vulnerability in the Linux kernel's BPF subsystem arises from insufficient validation of repeated field counts in user-supplied BTF data during BPF_BTF_LOAD. Specifically, btf_parse_struct_metas() and btf_repeat_fields() functions handle repeated fields by expanding them into a fixed-size scratch array. The calculation of the expanded field count uses 32-bit unsigned arithmetic, which can overflow and cause the capacity check to incorrectly pass. This leads to a subsequent memcpy() writing beyond the bounds of the scratch array, resulting in a potential out-of-bounds write. The patch addresses this by performing checked addition and multiplication to detect overflow and rejecting malformed BTF data with impossible counts.
Potential Impact
A malformed BTF input can trigger an out-of-bounds write in kernel memory during BPF program loading. This could potentially lead to kernel memory corruption, causing system instability or enabling privilege escalation. However, no known exploits are reported in the wild at this time.
Mitigation Recommendations
A fix has been implemented in the Linux kernel to address this vulnerability by validating repeated field counts with checked arithmetic and rejecting malformed BTF data. Users should apply the official kernel updates containing this patch once available. Since this is not a cloud service, remediation depends on applying the vendor's kernel patch. Patch status is not yet confirmed in the provided data; check the vendor advisory for current remediation guidance.
In the Linux kernel, the following vulnerability has been resolved: bpf: Validate BTF repeated field counts before expansion… (CVE-2026-64354)
Description
A vulnerability in the Linux kernel related to BPF (Berkeley Packet Filter) BTF (BPF Type Format) handling has been resolved. The issue involves improper validation of repeated field counts during BTF expansion, which can cause a buffer overflow via memcpy() when processing malformed BTF data. This occurs because the calculation of expanded field counts can wrap around in 32-bit arithmetic, bypassing capacity checks. The fix involves using checked arithmetic to prevent overflow and rejecting invalid counts.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in the Linux kernel's BPF subsystem arises from insufficient validation of repeated field counts in user-supplied BTF data during BPF_BTF_LOAD. Specifically, btf_parse_struct_metas() and btf_repeat_fields() functions handle repeated fields by expanding them into a fixed-size scratch array. The calculation of the expanded field count uses 32-bit unsigned arithmetic, which can overflow and cause the capacity check to incorrectly pass. This leads to a subsequent memcpy() writing beyond the bounds of the scratch array, resulting in a potential out-of-bounds write. The patch addresses this by performing checked addition and multiplication to detect overflow and rejecting malformed BTF data with impossible counts.
Potential Impact
A malformed BTF input can trigger an out-of-bounds write in kernel memory during BPF program loading. This could potentially lead to kernel memory corruption, causing system instability or enabling privilege escalation. However, no known exploits are reported in the wild at this time.
Mitigation Recommendations
A fix has been implemented in the Linux kernel to address this vulnerability by validating repeated field counts with checked arithmetic and rejecting malformed BTF data. Users should apply the official kernel updates containing this patch once available. Since this is not a cloud service, remediation depends on applying the vendor's kernel patch. Patch status is not yet confirmed in the provided data; check the vendor advisory for current remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-pwg2-g943-8mr4
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-64354"]
- Ecosystems
- []
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a65420b9c2644c7f8084d62
Added to database: 07/25/2026, 23:08:59 UTC
Last enriched: 07/25/2026, 23:31:22 UTC
Last updated: 07/26/2026, 06:19:14 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.