{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-74371","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-08-15T05:44:03.889Z","datePublished":"2026-08-15T05:58:51.610Z","dateUpdated":"2026-08-17T05:46:26.445Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-17T05:46:26.445Z"},"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."}],"metrics":[{"cvssV3_1":{"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"},"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()→bpf_prog_query()→cgroup_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's 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."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf-cgroup.h","kernel/bpf/cgroup.c","kernel/bpf/syscall.c"],"versions":[{"version":"1209339844601ec1766f4ff430673fbcfe42bb51","lessThan":"a7131340d0f95df9a541257dccab5d85e6bcdd2b","status":"affected","versionType":"git"},{"version":"1209339844601ec1766f4ff430673fbcfe42bb51","lessThan":"d3d630e8a7f3421bc2d204b87bdff35b4432a8e3","status":"affected","versionType":"git"},{"version":"1209339844601ec1766f4ff430673fbcfe42bb51","lessThan":"21c4b99b27f3f85b89256e81b3e997dec0a460d0","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf-cgroup.h","kernel/bpf/cgroup.c","kernel/bpf/syscall.c"],"versions":[{"version":"6.17","status":"affected"},{"version":"0","lessThan":"6.17","status":"unaffected","versionType":"semver"},{"version":"6.18.40","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.1.5","lessThanOrEqual":"7.1.*","status":"unaffected","versionType":"semver"},{"version":"7.2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.1.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.2"}]}]}],"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"}}}}