{"id":"CVE-2026-72427","aliases":["CVE-2026-72427"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Fix effective prog array index with BPF_F_PREORDER","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-08-15T05:56:44.197Z","modified":"2026-10-16T19:17:30.050Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"bc8023ef3b11410682e5d4990e05e5bc2d3e1c94","fixed":"525e408c27ae714e538b8c608c3a974df3ab6c92","status":"affected"},{"type":"git","introduced":"555c0b713ca83968d3c843cb15485b9ba3367b1b","fixed":"41b4320b84fdafe1ab586b06453d30d50415db59","status":"affected"},{"type":"git","introduced":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","fixed":"9697db03e010391c55ae75192cbdf30c5a72c114","status":"affected"},{"type":"git","introduced":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","fixed":"b584f107ab90222bd825dcb4c5977326ff684109","status":"affected"},{"type":"git","introduced":"4b82b181a26cff8bf7adc3a85a88d121d92edeaf","fixed":"f08aaee3152d0dfc578b3f2586932d82062701dd","status":"affected"},{"type":"git","version":"4707ad649cf662add3058bff47430817811b048d","status":"affected"},{"type":"semver","introduced":"6.6.93","fixed":"6.6.145","status":"affected"},{"type":"semver","introduced":"6.12.31","fixed":"6.12.97","status":"affected"},{"type":"semver","introduced":"6.14.9","fixed":"6.15","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.15","status":"unaffected"},{"type":"semver","introduced":"6.6.145","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.97","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.40","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.1.5","lastAffected":"7.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/525e408c27ae714e538b8c608c3a974df3ab6c92","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/41b4320b84fdafe1ab586b06453d30d50415db59","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9697db03e010391c55ae75192cbdf30c5a72c114","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b584f107ab90222bd825dcb4c5977326ff684109","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f08aaee3152d0dfc578b3f2586932d82062701dd","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-16T18:49:46.514Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-72427","url":"https://www.cve.org/CVERecord?id=CVE-2026-72427","licence":"CVE Terms of Use","modified":"2026-10-16T18:55:23.555Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-72427","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72427","licence":"Public domain","modified":"2026-10-16T19:17:30.050Z"}],"updatedAt":"2026-11-25T22:59:33.119Z","epss":{"score":0.00134,"percentile":0.03131,"date":"2026-12-01T12:00:22.000Z"}}