Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix effective prog array index with BPF_F_PREORDER

replace_effective_prog() and purge_effective_progs() located the slot in
the effective array by walking the program hlist and counting entries
linearly. That count does not match the array layout: compute_effective_
progs() places BPF_F_PREORDER programs at the front (ancestor cgroup
first, attach order within a cgroup) and the rest after them (descendant
cgroup first). So when a preorder program is present, the linear hlist
position no longer equals the program's index in the effective array.

For replace_effective_prog() (bpf_link_update()) this overwrote the
wrong slot, corrupting the effective order. For purge_effective_progs(),
it could dummy out a slot belonging to a different program and leave the
detached program in the array while bpf_prog_put() drops its reference,
i.e. a use-after-free.

Fix both by replaying compute_effective_progs()'s placement (including
the per-cgroup preorder reversal) in a shared effective_prog_pos()
helper. Identify the entry by its struct bpf_prog_list pointer rather
than by (prog, link) value, so the lookup resolves to exactly the
attachment the syscall selected even when the same bpf_prog is attached
to several cgroups in the hierarchy.
Published: 2026-08-15
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The kernel’s BPF subsystem tracks attached programs in an "effective" array, with an ordering rule that places programs marked BPF_F_PREORDER at the front. An earlier implementation used a linear walk of the program list to index into this array, but that walk no longer matches the actual array layout when such programs exist. Consequently, BPF program updates or deletions can overwrite a different array slot or incorrectly free a reference that is still in use, creating a use‑after‑free condition that corrupts memory and can be leveraged for privilege escalation or denial of service.

Affected Systems

All Linux kernel releases that compile BPF support and implement the BPF_F_PREORDER flag are affected. The advisory does not list specific kernel versions, but the vulnerability existed until the repository commits referenced in the advisory performed the fix.

Risk and Exploitability

The CVSS score of 7.8 indicates a high severity, and the vulnerability is not listed in the CISA KEV catalog; however, the EPSS score of < 1% indicates a very low expected exploitation probability. The presence of a use‑after‑free indicates a moderate to high risk if an attacker can trigger the vulnerable code paths. Exploitation requires local interaction via BPF system calls such as bpf_link_update or bpf_prog_put, so the attack vector is local and depends on the ability to attach or modify BPF programs from an untrusted process.

Generated by OpenCVE AI on August 22, 2026 at 05:45 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release that includes the BPF_F_PREORDER fix commits cited in the advisory references.
  • If a custom kernel build is required, apply the specific patch commits from the advisory to the kernel source and rebuild the kernel.
  • Reboot the system to load the patched kernel and ensure that no previously loaded BPF programs remain in memory.

Generated by OpenCVE AI on August 22, 2026 at 05:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 22 Aug 2026 04:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-129
CWE-416

Wed, 19 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-787
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 17 Aug 2026 16:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-129
CWE-416

Mon, 17 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sat, 15 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Fix effective prog array index with BPF_F_PREORDER replace_effective_prog() and purge_effective_progs() located the slot in the effective array by walking the program hlist and counting entries linearly. That count does not match the array layout: compute_effective_ progs() places BPF_F_PREORDER programs at the front (ancestor cgroup first, attach order within a cgroup) and the rest after them (descendant cgroup first). So when a preorder program is present, the linear hlist position no longer equals the program's index in the effective array. For replace_effective_prog() (bpf_link_update()) this overwrote the wrong slot, corrupting the effective order. For purge_effective_progs(), it could dummy out a slot belonging to a different program and leave the detached program in the array while bpf_prog_put() drops its reference, i.e. a use-after-free. Fix both by replaying compute_effective_progs()'s placement (including the per-cgroup preorder reversal) in a shared effective_prog_pos() helper. Identify the entry by its struct bpf_prog_list pointer rather than by (prog, link) value, so the lookup resolves to exactly the attachment the syscall selected even when the same bpf_prog is attached to several cgroups in the hierarchy.
Title bpf: Fix effective prog array index with BPF_F_PREORDER
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:44:07.623Z

Reserved: 2026-08-09T03:40:39.928Z

Link: CVE-2026-72427

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:22:16.520

Modified: 2026-08-17T06:19:09.980

Link: CVE-2026-72427

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-15T00:00:00Z

Links: CVE-2026-72427 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T06:00:11Z

Weaknesses