{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "797d73ee232dd1833dec4824bc53a22032e97c1c"
            },
            {
              "fixed": "c5ff816d5f13900c3f1f3298cfcc61339e056e56"
            },
            {
              "fixed": "cd407de2ef5dc70f1970b343ffaa16186340fdfd"
            },
            {
              "fixed": "ff77d013b737c0f77d925e2f2c59f0cf3d76bd35"
            },
            {
              "fixed": "b9452b594fd3aecbfd4aa0a6a1f741330a37dab7"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "6f957d972feee9b385ea3ae6530310a84e55ba71"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "6.11.6"
            },
            {
              "fixed": "6.12"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.12.0"
            },
            {
              "fixed": "6.12.96"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.39"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.1.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64354.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Validate BTF repeated field counts before expansion\n\nbtf_parse_struct_metas() walks user-supplied BTF during BPF_BTF_LOAD,\nand btf_repeat_fields() expands repeatable fields from array elements\ninto the fixed BTF_FIELDS_MAX scratch array used by btf_parse_fields().\n\nThe remaining-capacity check performs the expanded field count calculation\nin u32. A malformed BTF can wrap that calculation, causing the check to\npass even when the expanded field count exceeds the scratch array\ncapacity. The following memcpy() can then write past the end of the\narray.\n\nUse checked addition and multiplication before copying repeated fields\nand reject impossible counts.",
  "id": "CVE-2026-64354",
  "modified": "2026-07-28T03:55:49.585493168Z",
  "published": "2026-07-25T08:50:12.752Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b9452b594fd3aecbfd4aa0a6a1f741330a37dab7"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c5ff816d5f13900c3f1f3298cfcc61339e056e56"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/cd407de2ef5dc70f1970b343ffaa16186340fdfd"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ff77d013b737c0f77d925e2f2c59f0cf3d76bd35"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64354.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-64354"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "bpf: Validate BTF repeated field counts before expansion"
}