CVE-2024-56665: bpf,perf: Fix invalid prog_array access in perf_event_detach_bpf_prog
In the Linux kernel, the following vulnerability has been resolved:
bpf,perf: Fix invalid prog_array access in perf_event_detach_bpf_prog
Syzbot reported [1] crash that happens for following tracing scenario:
- create tracepoint perf event with attr.inherit=1, attach it to the
process and set bpf program to it
- attached process forks -> chid creates inherited event
the new child event shares the parent's bpf program and tp_event
(hence prog_array) which is global for tracepoint
- exit both process and its child -> release both events
- first perf_event_detach_bpf_prog call will release tp_event->prog_array
and second perf_event_detach_bpf_prog will crash, because
tp_event->prog_array is NULL
The fix makes sure the perf_event_detach_bpf_prog checks prog_array
is valid before it tries to remove the bpf program from it.
[1] https://lore.kernel.org/bpf/Z1MR6dCIKajNS6nU@krava/T/#m91dbf0688221ec7a7fc95e896a7ef9ff93b0b8ad
Security readout for executives and security teams
Plain-English summary
CVE-2024-56665 is a Linux kernel reliability flaw in BPF/perf tracepoint handling. A local, low-privileged user may be able to crash an affected system, causing denial of service. The public sources describe a kernel crash scenario and a fix, but do not show active exploitation.
Executive priority
Treat as a routine but real availability risk. Patch through normal kernel maintenance, with higher priority for shared Linux infrastructure where local users or workloads could intentionally trigger crashes.
Technical view
The bug is an invalid prog_array access in perf_event_detach_bpf_prog. In an inherited tracepoint perf event, parent and child events can share the tracepoint BPF program array. Detaching one event may clear tp_event->prog_array, and a later detach can dereference it, causing a crash. The fix validates prog_array before removal.
Likely exposure
Exposure is most relevant on Linux systems running affected kernel versions where local users or workloads can exercise perf/BPF tracepoint functionality. Internet-facing exposure is not indicated by the CVSS vector, which is local and requires privileges.
Exploitation context
The CVE is not listed as KEV in the provided bundle. Sources describe a syzbot-discovered crash condition, not real-world exploitation. The impact is availability only, with no sourced evidence of confidentiality or integrity compromise.
Researcher notes
The evidence supports a local denial-of-service issue in BPF/perf teardown logic. The affected-version data in the bundle is range-like and distribution backports may vary, so validate by vendor advisory or fixed commit presence rather than version number alone.
Mitigation direction
Update affected Linux kernels using vendor-supported packages or upstream stable fixes.
Prioritize multi-user hosts, container platforms, and systems running untrusted local workloads.
Check Debian LTS guidance if using Debian-maintained kernel packages.
Review vendor advisories before assuming upstream version strings reflect backported fixes.
Validation and detection
Inventory running Linux kernel versions across servers and container hosts.
Compare kernels against CVE, upstream stable commits, and distribution advisories.
Confirm the kernel includes the perf_event_detach_bpf_prog prog_array validity check.
Assess whether untrusted users can access perf or BPF tracing functionality.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-56665 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.