Bug 2334548 (CVE-2024-56675) - CVE-2024-56675 kernel: bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors
Summary: CVE-2024-56675 kernel: bpf: Fix UAF via mismatching bpf_prog/attachment RCU f...
Keywords:
Status: NEW
Alias: CVE-2024-56675
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-27 16:02 UTC by OSIDB Bzimport
Modified: 2025-01-22 17:30 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-12-27 16:02:48 UTC
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.

Comment 1 Avinash Hanwate 2024-12-28 02:45:53 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024122756-CVE-2024-56675-e996@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.