CVE-2026-64354 (GCVE-0-2026-64354)

Vulnerability from cvelistv5 – Published: 2026-07-25 08:50 – Updated: 2026-08-05 12:41
VLAI
Title
bpf: Validate BTF repeated field counts before expansion
Summary
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.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 797d73ee232dd1833dec4824bc53a22032e97c1c , < c5ff816d5f13900c3f1f3298cfcc61339e056e56 (git)
Affected: 797d73ee232dd1833dec4824bc53a22032e97c1c , < cd407de2ef5dc70f1970b343ffaa16186340fdfd (git)
Affected: 797d73ee232dd1833dec4824bc53a22032e97c1c , < ff77d013b737c0f77d925e2f2c59f0cf3d76bd35 (git)
Affected: 797d73ee232dd1833dec4824bc53a22032e97c1c , < b9452b594fd3aecbfd4aa0a6a1f741330a37dab7 (git)
Affected: 6f957d972feee9b385ea3ae6530310a84e55ba71 (git)
Affected: 6.11.6 , < 6.12 (semver)
Create a notification for this product.
Linux Linux Affected: 6.12
Unaffected: 0 , < 6.12 (semver)
Unaffected: 6.12.96 , ≤ 6.12.* (semver)
Unaffected: 6.18.39 , ≤ 6.18.* (semver)
Unaffected: 7.1.4 , ≤ 7.1.* (semver)
Unaffected: 7.2-rc1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/bpf/btf.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c5ff816d5f13900c3f1f3298cfcc61339e056e56",
              "status": "affected",
              "version": "797d73ee232dd1833dec4824bc53a22032e97c1c",
              "versionType": "git"
            },
            {
              "lessThan": "cd407de2ef5dc70f1970b343ffaa16186340fdfd",
              "status": "affected",
              "version": "797d73ee232dd1833dec4824bc53a22032e97c1c",
              "versionType": "git"
            },
            {
              "lessThan": "ff77d013b737c0f77d925e2f2c59f0cf3d76bd35",
              "status": "affected",
              "version": "797d73ee232dd1833dec4824bc53a22032e97c1c",
              "versionType": "git"
            },
            {
              "lessThan": "b9452b594fd3aecbfd4aa0a6a1f741330a37dab7",
              "status": "affected",
              "version": "797d73ee232dd1833dec4824bc53a22032e97c1c",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "6f957d972feee9b385ea3ae6530310a84e55ba71",
              "versionType": "git"
            },
            {
              "lessThan": "6.12",
              "status": "affected",
              "version": "6.11.6",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/bpf/btf.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.12"
            },
            {
              "lessThan": "6.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.96",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.39",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.1.*",
              "status": "unaffected",
              "version": "7.1.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.96",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.39",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1.4",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2-rc1",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.11.6",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "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."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The attacker reaches the vulnerable parser through the local bpf(BPF_BTF_LOAD) syscall; no network or physical path exists.\nAC:L - A compact, deterministic malformed BTF object triggers the arithmetic wrap and immediate out-of-bounds memcpy without a race or uncontrollable condition.\nPR:L - BPF_BTF_LOAD normally requires init-namespace CAP_BPF, but a delegated BPF token permits CAP_BPF in its user namespace. Thus a namespace-root attacker in a reasonably delegated container environment can reach it with low privileges.\nUI:N - The attacker invokes BPF_BTF_LOAD directly and requires no action from another user.\nS:U - The corruption occurs within the host kernel\u0027s security authority; resulting privilege escalation or container escape is standard kernel compromise rather than a CVSS scope change.\nC:H - The attacker-influenced kernel-stack overflow can corrupt control data and plausibly enable kernel code execution, which would expose arbitrary kernel memory.\nI:H - The vulnerable memcpy performs a large out-of-bounds kernel-stack write using attacker-influenced metadata records, making control-flow corruption and arbitrary kernel modification defensible.\nA:H - The expansion repeatedly overwrites beyond the stack array until it reaches control data, a guard page, or adjacent kernel memory, allowing a deterministic kernel oops, panic, or severe corruption."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:41:03.295Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c5ff816d5f13900c3f1f3298cfcc61339e056e56"
        },
        {
          "url": "https://git.kernel.org/stable/c/cd407de2ef5dc70f1970b343ffaa16186340fdfd"
        },
        {
          "url": "https://git.kernel.org/stable/c/ff77d013b737c0f77d925e2f2c59f0cf3d76bd35"
        },
        {
          "url": "https://git.kernel.org/stable/c/b9452b594fd3aecbfd4aa0a6a1f741330a37dab7"
        }
      ],
      "title": "bpf: Validate BTF repeated field counts before expansion",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-64354",
    "datePublished": "2026-07-25T08:50:12.752Z",
    "dateReserved": "2026-07-19T15:36:31.782Z",
    "dateUpdated": "2026-08-05T12:41:03.295Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-64354",
      "date": "2026-08-10",
      "epss": "0.00129",
      "percentile": "0.0289"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-64354\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-07-25T10:17:17.810\",\"lastModified\":\"2026-07-27T05:16:42.943\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"kernel/bpf/btf.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"797d73ee232dd1833dec4824bc53a22032e97c1c\",\"lessThan\":\"c5ff816d5f13900c3f1f3298cfcc61339e056e56\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"797d73ee232dd1833dec4824bc53a22032e97c1c\",\"lessThan\":\"cd407de2ef5dc70f1970b343ffaa16186340fdfd\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"797d73ee232dd1833dec4824bc53a22032e97c1c\",\"lessThan\":\"ff77d013b737c0f77d925e2f2c59f0cf3d76bd35\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"797d73ee232dd1833dec4824bc53a22032e97c1c\",\"lessThan\":\"b9452b594fd3aecbfd4aa0a6a1f741330a37dab7\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"6f957d972feee9b385ea3ae6530310a84e55ba71\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"6.11.6\",\"lessThan\":\"6.12\",\"versionType\":\"semver\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"kernel/bpf/btf.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.12\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.12\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.96\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18.39\",\"lessThanOrEqual\":\"6.18.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.1.4\",\"lessThanOrEqual\":\"7.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2-rc1\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/b9452b594fd3aecbfd4aa0a6a1f741330a37dab7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c5ff816d5f13900c3f1f3298cfcc61339e056e56\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/cd407de2ef5dc70f1970b343ffaa16186340fdfd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ff77d013b737c0f77d925e2f2c59f0cf3d76bd35\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-27T08:23:40+00:00",
      "cve": "CVE-2026-64354",
      "id": "CVE-2026-64354",
      "initial_release_date": "2026-07-25T00:00:00+00:00",
      "product_status:known_affected": "184",
      "product_status:known_not_affected": "90",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: bpf: Validate BTF repeated field counts before expansion",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-64354.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…