GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2026-74371 (GCVE-0-2026-74371)

Vulnerability from cvelistv5 – Published: 2026-08-15 05:58 – Updated: 2026-08-17 05:46
VLAI
Title
bpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat
Summary
In the Linux kernel, the following vulnerability has been resolved: bpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat BPF_PROG_QUERY writes back the 'query.revision' field unconditionally to userspace. If userspace passes a smaller 'bpf_attr' structure (e.g. 40 bytes, which was the layout before the addition of 'query.revision'), the kernel performs an out-of-bounds write. Fix this by propagating the user-provided attribute size 'uattr_size' down to the cgroup query handlers, and conditionally skipping writing the revision field to userspace when the provided buffer size is insufficient. query.revision in bpf_mprog_query is structurally identical to the cgroup case: a late tail field, written unconditionally. But the backward-compat hazard is not the same. The min-historical-size test is per command, and bpf_mprog_query only serves attach types that were born with revision in the struct: - tcx_prog_query -> BPF_TCX_INGRESS/EGRESS - netkit_prog_query -> BPF_NETKIT_PRIMARY/PEER tcx, netkit, the revision field, and bpf_mprog_query itself all landed in the same v6.6 merge window (053c8e1f235d added the mprog query API + revision; tcx in e420bed02507, netkit in 35dfaad7188c). There has never been a tcx/netkit BPF_PROG_QUERY userspace that doesn't know about revision. So for these commands the minimum legitimate struct already covers offset 56-64 — no old binary can be broken here. Contrast with cgroup: BPF_PROG_QUERY on cgroup attach types shipped in 2017; revision write-back was bolted on years later (120933984460). That path has a real population of pre-revision callers.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 1209339844601ec1766f4ff430673fbcfe42bb51 , < a7131340d0f95df9a541257dccab5d85e6bcdd2b (git)
Affected: 1209339844601ec1766f4ff430673fbcfe42bb51 , < d3d630e8a7f3421bc2d204b87bdff35b4432a8e3 (git)
Affected: 1209339844601ec1766f4ff430673fbcfe42bb51 , < 21c4b99b27f3f85b89256e81b3e997dec0a460d0 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.17
Unaffected: 0 , < 6.17 (semver)
Unaffected: 6.18.40 , ≤ 6.18.* (semver)
Unaffected: 7.1.5 , ≤ 7.1.* (semver)
Unaffected: 7.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "include/linux/bpf-cgroup.h",
            "kernel/bpf/cgroup.c",
            "kernel/bpf/syscall.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "a7131340d0f95df9a541257dccab5d85e6bcdd2b",
              "status": "affected",
              "version": "1209339844601ec1766f4ff430673fbcfe42bb51",
              "versionType": "git"
            },
            {
              "lessThan": "d3d630e8a7f3421bc2d204b87bdff35b4432a8e3",
              "status": "affected",
              "version": "1209339844601ec1766f4ff430673fbcfe42bb51",
              "versionType": "git"
            },
            {
              "lessThan": "21c4b99b27f3f85b89256e81b3e997dec0a460d0",
              "status": "affected",
              "version": "1209339844601ec1766f4ff430673fbcfe42bb51",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "include/linux/bpf-cgroup.h",
            "kernel/bpf/cgroup.c",
            "kernel/bpf/syscall.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.17"
            },
            {
              "lessThan": "6.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.40",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.1.*",
              "status": "unaffected",
              "version": "7.1.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.40",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1.5",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat\n\nBPF_PROG_QUERY writes back the \u0027query.revision\u0027 field unconditionally to\nuserspace. If userspace passes a smaller \u0027bpf_attr\u0027 structure (e.g. 40\nbytes, which was the layout before the addition of \u0027query.revision\u0027),\nthe kernel performs an out-of-bounds write.\n\nFix this by propagating the user-provided attribute size \u0027uattr_size\u0027\ndown to the cgroup query handlers, and conditionally skipping writing\nthe revision field to userspace when the provided buffer size is\ninsufficient.\n\nquery.revision in bpf_mprog_query is structurally identical to the\ncgroup case: a late tail field, written unconditionally.\n\nBut the backward-compat hazard is not the same.\n\nThe min-historical-size test is per command, and bpf_mprog_query only\nserves attach types that were born with revision in the struct:\n\n- tcx_prog_query -\u003e BPF_TCX_INGRESS/EGRESS\n- netkit_prog_query -\u003e BPF_NETKIT_PRIMARY/PEER\n\ntcx, netkit, the revision field, and bpf_mprog_query itself all landed in\nthe same v6.6 merge window (053c8e1f235d added the mprog query API +\nrevision; tcx in e420bed02507, netkit in 35dfaad7188c). There has never\nbeen a tcx/netkit BPF_PROG_QUERY userspace that doesn\u0027t know about\nrevision. So for these commands the minimum legitimate struct already\ncovers offset 56-64 \u2014 no old binary can be broken here.\n\nContrast with cgroup: BPF_PROG_QUERY on cgroup attach types shipped in\n2017; revision write-back was bolted on years later (120933984460). That\npath has a real population of pre-revision callers."
        }
      ],
      "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 flaw is reached only through the bpf(2) syscall BPF_PROG_QUERY command on cgroup attach types via __sys_bpf()\u2192bpf_prog_query()\u2192cgroup_bpf_prog_query(); per kernel CNA guidance BPF/tc/netlink paths are Local, not Network.\nAC:L - The attacker fully controls the bpf_attr buffer, its declared size (e.g. 40 bytes pre-revision), placement in memory, cgroup2 target_fd, and attach_type; passing a short size reliably triggers the 8-byte revision copy_to_user at offset 56 with no race or external precondition.\nPR:L - bpf_prog_query() enforces bpf_net_capable(), requiring CAP_NET_ADMIN or CAP_SYS_ADMIN; both are delegable and obtainable inside an unprivileged user namespace (unshare -Urn) on typical distributions, so this is Low rather than init-namespace administrator.\nUI:N - Exploitation requires only the attacker\u0027s own bpf(BPF_PROG_QUERY) syscall (or an auto-invoked legacy-sized query after kernel upgrade); no separate victim mount, file open, or interactive action is needed.\nS:U - copy_to_user() writes past the caller-supplied userspace buffer boundary, corrupting adjacent mappings in the calling process; it does not corrupt kernel heap/slab memory or cross VM, IOMMU, or container-to-host security boundaries.\nC:H - The kernel performs an out-of-bounds 8-byte write past the declared bpf_attr size; per CNA guidance any such memory corruption can be leveraged for information disclosure via adjacent userspace secrets, not merely a bounded metadata leak.\nI:H - The unconditional copy_to_user of query.revision at offset 56 when size is below offsetofend(revision) is an out-of-bounds write of up to 8 bytes (revision value partly influenced by prior cgroup BPF attach/detach), enabling userspace heap/stack corruption and potential code execution.\nA:H - The OOB write can crash or hang privileged BPF/cgroup management daemons (containerd, Cilium, kubelet) still issuing legacy-sized BPF_PROG_QUERY after a 6.17+ upgrade, and malicious CAP_NET_ADMIN callers can repeatedly corrupt adjacent mappings to induce process termination."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-17T05:46:26.445Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/a7131340d0f95df9a541257dccab5d85e6bcdd2b"
        },
        {
          "url": "https://git.kernel.org/stable/c/d3d630e8a7f3421bc2d204b87bdff35b4432a8e3"
        },
        {
          "url": "https://git.kernel.org/stable/c/21c4b99b27f3f85b89256e81b3e997dec0a460d0"
        }
      ],
      "title": "bpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-74371",
    "datePublished": "2026-08-15T05:58:51.610Z",
    "dateReserved": "2026-08-15T05:44:03.889Z",
    "dateUpdated": "2026-08-17T05:46:26.445Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-74371",
      "date": "2026-09-04",
      "epss": "0.00127",
      "percentile": "0.02665"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-74371\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-08-15T06:22:38.857\",\"lastModified\":\"2026-08-17T06:19:31.903\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nbpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat\\n\\nBPF_PROG_QUERY writes back the \u0027query.revision\u0027 field unconditionally to\\nuserspace. If userspace passes a smaller \u0027bpf_attr\u0027 structure (e.g. 40\\nbytes, which was the layout before the addition of \u0027query.revision\u0027),\\nthe kernel performs an out-of-bounds write.\\n\\nFix this by propagating the user-provided attribute size \u0027uattr_size\u0027\\ndown to the cgroup query handlers, and conditionally skipping writing\\nthe revision field to userspace when the provided buffer size is\\ninsufficient.\\n\\nquery.revision in bpf_mprog_query is structurally identical to the\\ncgroup case: a late tail field, written unconditionally.\\n\\nBut the backward-compat hazard is not the same.\\n\\nThe min-historical-size test is per command, and bpf_mprog_query only\\nserves attach types that were born with revision in the struct:\\n\\n- tcx_prog_query -\u003e BPF_TCX_INGRESS/EGRESS\\n- netkit_prog_query -\u003e BPF_NETKIT_PRIMARY/PEER\\n\\ntcx, netkit, the revision field, and bpf_mprog_query itself all landed in\\nthe same v6.6 merge window (053c8e1f235d added the mprog query API +\\nrevision; tcx in e420bed02507, netkit in 35dfaad7188c). There has never\\nbeen a tcx/netkit BPF_PROG_QUERY userspace that doesn\u0027t know about\\nrevision. So for these commands the minimum legitimate struct already\\ncovers offset 56-64 \u2014 no old binary can be broken here.\\n\\nContrast with cgroup: BPF_PROG_QUERY on cgroup attach types shipped in\\n2017; revision write-back was bolted on years later (120933984460). That\\npath has a real population of pre-revision callers.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"include/linux/bpf-cgroup.h\",\"kernel/bpf/cgroup.c\",\"kernel/bpf/syscall.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"1209339844601ec1766f4ff430673fbcfe42bb51\",\"lessThan\":\"a7131340d0f95df9a541257dccab5d85e6bcdd2b\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"1209339844601ec1766f4ff430673fbcfe42bb51\",\"lessThan\":\"d3d630e8a7f3421bc2d204b87bdff35b4432a8e3\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"1209339844601ec1766f4ff430673fbcfe42bb51\",\"lessThan\":\"21c4b99b27f3f85b89256e81b3e997dec0a460d0\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"include/linux/bpf-cgroup.h\",\"kernel/bpf/cgroup.c\",\"kernel/bpf/syscall.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.17\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.17\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18.40\",\"lessThanOrEqual\":\"6.18.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.1.5\",\"lessThanOrEqual\":\"7.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2\",\"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/21c4b99b27f3f85b89256e81b3e997dec0a460d0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a7131340d0f95df9a541257dccab5d85e6bcdd2b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d3d630e8a7f3421bc2d204b87bdff35b4432a8e3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-20T20:53:29+00:00",
      "cve": "CVE-2026-74371",
      "id": "CVE-2026-74371",
      "initial_release_date": "2026-08-15T00:00:00+00:00",
      "product_status:known_affected": "76",
      "product_status:known_not_affected": "198",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: bpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-74371.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…