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

Vulnerability from cvelistv5 – Published: 2026-08-15 05:58 – Updated: 2026-09-14 11:58
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: 195814a38a6a712bcb44d3dfa5109e926e92bec4 , < b78eb6efbf052d44a3a14726aa7c7d5aa2e544d7 (git)
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": "b78eb6efbf052d44a3a14726aa7c7d5aa2e544d7",
              "status": "affected",
              "version": "195814a38a6a712bcb44d3dfa5109e926e92bec4",
              "versionType": "git"
            },
            {
              "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-09-14T11:58:45.047Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/b78eb6efbf052d44a3a14726aa7c7d5aa2e544d7"
        },
        {
          "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-09-14T11:58:45.047Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-74371",
      "date": "2026-09-20",
      "epss": "0.00129",
      "percentile": "0.02876"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "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": "b78eb6efbf052d44a3a14726aa7c7d5aa2e544d7",
                    "status": "affected",
                    "version": "195814a38a6a712bcb44d3dfa5109e926e92bec4",
                    "versionType": "git"
                  },
                  {
                    "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"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "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."
          }
        ],
        "id": "CVE-2026-74371",
        "lastModified": "2026-09-14T12:17:45.663",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2026-08-15T06:22:38.857",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "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/b78eb6efbf052d44a3a14726aa7c7d5aa2e544d7"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/d3d630e8a7f3421bc2d204b87bdff35b4432a8e3"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    },
    "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"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-03T00:06:46Z",
      "cve": "CVE-2026-74371",
      "id": "CVE-2026-74371",
      "initial_release_date": "2026-09-03T00:06:46Z",
      "product_status:known_not_affected": "362",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-74371",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2026-74371.json",
      "version": "2"
    }
  }
}



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…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…