{"api_version":"1","generated_at":"2026-08-15T08:45:06+00:00","cve":"CVE-2026-74371","urls":{"html":"https://cve.report/CVE-2026-74371","api":"https://cve.report/api/cve/CVE-2026-74371.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-74371","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-74371"},"summary":{"title":"bpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat","description":"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 'query.revision' field unconditionally to\nuserspace. If userspace passes a smaller 'bpf_attr' structure (e.g. 40\nbytes, which was the layout before the addition of 'query.revision'),\nthe kernel performs an out-of-bounds write.\n\nFix this by propagating the user-provided attribute size 'uattr_size'\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 -> BPF_TCX_INGRESS/EGRESS\n- netkit_prog_query -> 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't know about\nrevision. So for these commands the minimum legitimate struct already\ncovers offset 56-64 — 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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-08-15 06:22:38","updated_at":"2026-08-15 06:22:38"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/a7131340d0f95df9a541257dccab5d85e6bcdd2b","name":"https://git.kernel.org/stable/c/a7131340d0f95df9a541257dccab5d85e6bcdd2b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d3d630e8a7f3421bc2d204b87bdff35b4432a8e3","name":"https://git.kernel.org/stable/c/d3d630e8a7f3421bc2d204b87bdff35b4432a8e3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/21c4b99b27f3f85b89256e81b3e997dec0a460d0","name":"https://git.kernel.org/stable/c/21c4b99b27f3f85b89256e81b3e997dec0a460d0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-74371","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74371","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1209339844601ec1766f4ff430673fbcfe42bb51 a7131340d0f95df9a541257dccab5d85e6bcdd2b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1209339844601ec1766f4ff430673fbcfe42bb51 d3d630e8a7f3421bc2d204b87bdff35b4432a8e3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1209339844601ec1766f4ff430673fbcfe42bb51 21c4b99b27f3f85b89256e81b3e997dec0a460d0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.17","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.17 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.40 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1.5 7.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"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-rc1","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-rc1","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 'query.revision' field unconditionally to\nuserspace. If userspace passes a smaller 'bpf_attr' structure (e.g. 40\nbytes, which was the layout before the addition of 'query.revision'),\nthe kernel performs an out-of-bounds write.\n\nFix this by propagating the user-provided attribute size 'uattr_size'\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 -> BPF_TCX_INGRESS/EGRESS\n- netkit_prog_query -> 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't know about\nrevision. So for these commands the minimum legitimate struct already\ncovers offset 56-64 — 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."}],"providerMetadata":{"dateUpdated":"2026-08-15T05:58:51.610Z","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-15T05:58:51.610Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-08-15 06:22:38","lastModifiedDate":"2026-08-15 06:22:38","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"74371","Ordinal":"1","Title":"bpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat","CVE":"CVE-2026-74371","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"74371","Ordinal":"1","NoteData":"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 'query.revision' field unconditionally to\nuserspace. If userspace passes a smaller 'bpf_attr' structure (e.g. 40\nbytes, which was the layout before the addition of 'query.revision'),\nthe kernel performs an out-of-bounds write.\n\nFix this by propagating the user-provided attribute size 'uattr_size'\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 -> BPF_TCX_INGRESS/EGRESS\n- netkit_prog_query -> 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't know about\nrevision. So for these commands the minimum legitimate struct already\ncovers offset 56-64 — 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.","Type":"Description","Title":"bpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat"}]}}}