7.8high
bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors
- Severity
- 7.8high CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.23% (higher than 14% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors Uprobes always use bpf_prog_run_array_uprobe() under tasks-trace-RCU protection. But it is possible to attach a non-sleepable BPF program to a uprobe, and non-sleepable BPF programs are freed via normal RCU (see __bpf_prog_put_noref()). This leads to UAF of the bpf_prog because a normal RCU grace period does not imply a tasks-trace-RCU grace period. Fix it by explicitly waiting for a tasks-trace-RCU grace period after removing the attachment of a bpf_prog to a perf_event.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 8c7dcb84e3b744b2b70baa7a44a9b1881c33a9c9 before 9245459a992d22fe0e92e988f49db1fec82c184a, from 8c7dcb84e3b744b2b70baa7a44a9b1881c33a9c9 before f9f85df30118f3f4112761e6682fc60ebcce23e5, from 8c7dcb84e3b744b2b70baa7a44a9b1881c33a9c9 before 9b53d2c2a38a1effc341d99be3f99fa7ef17047d, from 8c7dcb84e3b744b2b70baa7a44a9b1881c33a9c9 before ef1b808e3b7c98612feceedf985c2fbbeb28f956, 6.0 Not affected: before 6.0, from 6.1.121 up to 6.1.*, from 6.6.67 up to 6.6.*, from 6.12.6 up to 6.12.*, from 6.13 up to * | CVE List |
| linux linux_kernel | from 6.0 before 6.1.121, from 6.2 before 6.6.67, from 6.7 before 6.12.6, 6.13 | NVD |
All scores
| CISA-ADP | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors Uprobes always use bpf_prog_run_array_uprobe() under tasks-trace-RCU protection. But it is possible to attach a non-sleepable BPF program to a uprobe, and non-sleepable BPF programs are freed via normal RCU (see __bpf_prog_put_noref()). This leads to UAF of the bpf_prog because a normal RCU grace period does not imply a tasks-trace-RCU grace period. Fix it by explicitly waiting for a tasks-trace-RCU grace period after removing the attachment of a bpf_prog to a perf_event.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf: Arreglar UAF a través de la falta de coincidencia de los sabores de RCU de bpf_prog/attachment Los uprobes siempre usan bpf_prog_run_array_uprobe() bajo la protección de tareas-trace-RCU. Pero es posible adjuntar un programa BPF no durmiente a un uprobe, y los programas BPF no durmientes se liberan a través de RCU normal (ver __bpf_prog_put_noref()). Esto lleva a UAF de bpf_prog porque un período de gracia de RCU normal no implica un período de gracia de tareas-trace-RCU. Arréglelo esperando explícitamente un período de gracia de tareas-trace-RCU después de eliminar la conexión de un bpf_prog a un perf_event.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-56675 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2024-56675 changed 2026-06-17 | Public domain |