{"id":"CVE-2026-72427","state":"PUBLISHED","title":"bpf: Fix effective prog array index with BPF_F_PREORDER","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix effective prog array index with BPF_F_PREORDER\n\nreplace_effective_prog() and purge_effective_progs() located the slot in\nthe effective array by walking the program hlist and counting entries\nlinearly. That count does not match the array layout: compute_effective_\nprogs() places BPF_F_PREORDER programs at the front (ancestor cgroup\nfirst, attach order within a cgroup) and the rest after them (descendant\ncgroup first). So when a preorder program is present, the linear hlist\nposition no longer equals the program's index in the effective array.\n\nFor replace_effective_prog() (bpf_link_update()) this overwrote the\nwrong slot, corrupting the effective order. For purge_effective_progs(),\nit could dummy out a slot belonging to a different program and leave the\ndetached program in the array while bpf_prog_put() drops its reference,\ni.e. a use-after-free.\n\nFix both by replaying compute_effective_progs()'s placement (including\nthe per-cgroup preorder reversal) in a shared effective_prog_pos()\nhelper. Identify the entry by its struct bpf_prog_list pointer rather\nthan by (prog, link) value, so the lookup resolves to exactly the\nattachment the syscall selected even when the same bpf_prog is attached\nto several cgroups in the hierarchy.","publishedAt":"2026-08-15T05:56:44.197Z","updatedAt":"2026-10-16T18:55:23.555Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bc8023ef3b11410682e5d4990e05e5bc2d3e1c94","status":"affected","lessThan":"525e408c27ae714e538b8c608c3a974df3ab6c92","versionType":"git"},{"version":"555c0b713ca83968d3c843cb15485b9ba3367b1b","status":"affected","lessThan":"41b4320b84fdafe1ab586b06453d30d50415db59","versionType":"git"},{"version":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","status":"affected","lessThan":"9697db03e010391c55ae75192cbdf30c5a72c114","versionType":"git"},{"version":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","status":"affected","lessThan":"b584f107ab90222bd825dcb4c5977326ff684109","versionType":"git"},{"version":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","status":"affected","lessThan":"f08aaee3152d0dfc578b3f2586932d82062701dd","versionType":"git"},{"version":"4707ad649cf662add3058bff47430817811b048d","status":"affected","versionType":"git"},{"version":"6.6.93","status":"affected","lessThan":"6.6.145","versionType":"semver"},{"version":"6.12.31","status":"affected","lessThan":"6.12.97","versionType":"semver"},{"version":"6.14.9","status":"affected","lessThan":"6.15","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cgroup.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.6.145","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.97","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cgroup.c"]}],"references":["https://git.kernel.org/stable/c/525e408c27ae714e538b8c608c3a974df3ab6c92","https://git.kernel.org/stable/c/41b4320b84fdafe1ab586b06453d30d50415db59","https://git.kernel.org/stable/c/9697db03e010391c55ae75192cbdf30c5a72c114","https://git.kernel.org/stable/c/b584f107ab90222bd825dcb4c5977326ff684109","https://git.kernel.org/stable/c/f08aaee3152d0dfc578b3f2586932d82062701dd"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:58.252Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/72xxx/CVE-2026-72427.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-72427","state":"PUBLISHED","datePublished":"2026-08-15T05:56:44.197Z","dateUpdated":"2026-10-16T18:55:23.555Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-09T03:40:39.928Z"},"containers":{"cna":{"title":"bpf: Fix effective prog array index with BPF_F_PREORDER","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix effective prog array index with BPF_F_PREORDER\n\nreplace_effective_prog() and purge_effective_progs() located the slot in\nthe effective array by walking the program hlist and counting entries\nlinearly. That count does not match the array layout: compute_effective_\nprogs() places BPF_F_PREORDER programs at the front (ancestor cgroup\nfirst, attach order within a cgroup) and the rest after them (descendant\ncgroup first). So when a preorder program is present, the linear hlist\nposition no longer equals the program's index in the effective array.\n\nFor replace_effective_prog() (bpf_link_update()) this overwrote the\nwrong slot, corrupting the effective order. For purge_effective_progs(),\nit could dummy out a slot belonging to a different program and leave the\ndetached program in the array while bpf_prog_put() drops its reference,\ni.e. a use-after-free.\n\nFix both by replaying compute_effective_progs()'s placement (including\nthe per-cgroup preorder reversal) in a shared effective_prog_pos()\nhelper. Identify the entry by its struct bpf_prog_list pointer rather\nthan by (prog, link) value, so the lookup resolves to exactly the\nattachment the syscall selected even when the same bpf_prog is attached\nto several cgroups in the hierarchy."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bc8023ef3b11410682e5d4990e05e5bc2d3e1c94","status":"affected","lessThan":"525e408c27ae714e538b8c608c3a974df3ab6c92","versionType":"git"},{"version":"555c0b713ca83968d3c843cb15485b9ba3367b1b","status":"affected","lessThan":"41b4320b84fdafe1ab586b06453d30d50415db59","versionType":"git"},{"version":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","status":"affected","lessThan":"9697db03e010391c55ae75192cbdf30c5a72c114","versionType":"git"},{"version":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","status":"affected","lessThan":"b584f107ab90222bd825dcb4c5977326ff684109","versionType":"git"},{"version":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","status":"affected","lessThan":"f08aaee3152d0dfc578b3f2586932d82062701dd","versionType":"git"},{"version":"4707ad649cf662add3058bff47430817811b048d","status":"affected","versionType":"git"},{"version":"6.6.93","status":"affected","lessThan":"6.6.145","versionType":"semver"},{"version":"6.12.31","status":"affected","lessThan":"6.12.97","versionType":"semver"},{"version":"6.14.9","status":"affected","lessThan":"6.15","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cgroup.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.6.145","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.97","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cgroup.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/525e408c27ae714e538b8c608c3a974df3ab6c92"},{"url":"https://git.kernel.org/stable/c/41b4320b84fdafe1ab586b06453d30d50415db59"},{"url":"https://git.kernel.org/stable/c/9697db03e010391c55ae75192cbdf30c5a72c114"},{"url":"https://git.kernel.org/stable/c/b584f107ab90222bd825dcb4c5977326ff684109"},{"url":"https://git.kernel.org/stable/c/f08aaee3152d0dfc578b3f2586932d82062701dd"}],"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 - Exploitation requires local bpf() syscalls (BPF_LINK_CREATE/BPF_PROG_ATTACH with BPF_F_PREORDER, BPF_LINK_UPDATE, BPF_PROG_DETACH/BPF_LINK_DETACH) through __cgroup_bpf_replace/__cgroup_bpf_detach in kernel/bpf/cgroup.c; per kernel CNA guidance BPF cgroup hooks are Local even when later triggered by packets.\nAC:L - Attacker fully controls cgroup hierarchy, BPF_F_PREORDER|BPF_F_ALLOW_MULTI attachments, and bpf_link_update/detach timing; purge_effective_progs UAF needs update_effective_progs() OOM which attacker can induce via memory pressure/large hierarchies, and bpf_link_update ordering corruption triggers without OOM.\nPR:L - Reaching the bug requires CAP_BPF (and CAP_NET_ADMIN for most cgroup BPF types) plus cgroup v2 attach access, commonly obtainable by unprivileged users via delegated cgroups or user namespaces (CAP_BPF/CAP_NET_ADMIN), not init-namespace root.\nUI:N - Attacker loads, attaches, and updates/detaches their own cgroup BPF programs and links via bpf(); no separate victim or administrator action is required.\nS:U - The bug corrupts kernel cgroup BPF effective-prog arrays causing UAF/ordering corruption within the same kernel security domain, enabling local privilege escalation rather than crossing VM, IOMMU, or sandbox boundaries.\nC:H - purge_effective_progs() can leave a detached bpf_prog pointer in the RCU-protected effective array while bpf_prog_put() frees it, yielding a use-after-free read when __cgroup_bpf_run_filter_* later executes the stale program under RCU.\nI:H - UAF of bpf_prog objects enables heap reuse for arbitrary kernel writes/control-flow hijack; bpf_link_update() mis-indexing can overwrite another attachment's effective slot so attacker-controlled BPF runs in place of security/filter programs on traffic for the whole cgroup tree.\nA:H - Freed-but-still-referenced programs are executed from softirq/network cgroup hooks and reliably cause kernel oops/panic/KASAN failures; ordering corruption can also crash or hang filtering paths serving container/cloud workloads."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-17T05:44:07.623Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.93","versionEndExcluding":"6.6.145"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.31","versionEndExcluding":"6.12.97"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.18.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.1.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-72427","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T18:49:46.514218Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-16T18:55:23.555Z"}}]}}}