CVE-2024-35860: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: bpf: support deferring bpf_link dealloc to after RCU grace period BPF link for some program types is passed as a "context" which can be used by those BPF programs to look up additional information. E.g., for multi-kprobes and multi-uprobes, link is used to fetch BPF cookie values. Because of this runtime dependency, when bpf_link refcnt drops to zero there could still be active BPF programs running accessing link data. This patch adds generic support to defer bpf_link dealloc callback to after RCU GP, if requested. This is done by exposing two different deallocation callbacks, one synchronous and one deferred. If deferred one is provided, bpf_link_free() will schedule dealloc_deferred() callback to happen after RCU GP. BPF is using two flavors of RCU: "classic" non-sleepable one and RCU tasks trace one. The latter is used when sleepable BPF programs are used. bpf_link_free() accommodates that by checking underlying BPF program's sleepable flag, and goes either through normal RCU GP only for non-sleepable, or through RCU tasks trace GP *and* then normal RCU GP (taking into account rcu_trace_implies_rcu_gp() optimization), if BPF program is sleepable. We use this for multi-kprobe and multi-uprobe links, which dereference link during program run. We also preventively switch raw_tp link to use deferred dealloc callback, as upcoming changes in bpf-next tree expose raw_tp link data (specifically, cookie value) to BPF program at runtime as well.
AI Analysis
Technical Summary
CVE-2024-35860 addresses a vulnerability in the Linux kernel's handling of BPF (Berkeley Packet Filter) links, specifically related to the timing of deallocation of bpf_link objects. BPF programs can use bpf_link as a context to access additional information at runtime, such as cookie values in multi-kprobe and multi-uprobe scenarios. The vulnerability arises because the bpf_link reference count can drop to zero and trigger deallocation while active BPF programs are still running and accessing the link data. This creates a use-after-free condition, potentially leading to memory corruption or kernel crashes. The patch introduces a mechanism to defer the deallocation of bpf_link objects until after the RCU (Read-Copy-Update) grace period, ensuring that no active BPF programs are accessing the link data when it is freed. The patch supports two types of deallocation callbacks: synchronous and deferred. Deferred deallocation schedules the free operation after the appropriate RCU grace period, which varies depending on whether the BPF program is sleepable or non-sleepable. This distinction is important because sleepable BPF programs require a more complex RCU tasks trace grace period before deallocation. The fix is applied to multi-kprobe and multi-uprobe links and preemptively to raw_tp links, anticipating future kernel changes that expose raw_tp link data to BPF programs at runtime. Overall, this vulnerability is a subtle kernel memory management issue that could lead to instability or potential exploitation if an attacker can trigger use-after-free conditions in BPF programs that rely on these links.
Potential Impact
For European organizations, the impact of CVE-2024-35860 could be significant, especially for those relying heavily on Linux-based infrastructure, including servers, cloud environments, and embedded systems. BPF is widely used for networking, security monitoring, and performance tracing, so a vulnerability in its link management can affect critical system components. Exploitation could lead to kernel crashes or memory corruption, potentially causing denial of service or enabling privilege escalation if combined with other vulnerabilities. Organizations running multi-kprobe, multi-uprobe, or raw_tp BPF programs are particularly at risk. Given the widespread use of Linux in European data centers, telecommunications, and industrial control systems, this vulnerability could disrupt services or be leveraged in targeted attacks. However, there are no known exploits in the wild yet, which reduces immediate risk but does not eliminate the need for prompt mitigation. The complexity of the vulnerability means that exploitation requires detailed knowledge of kernel internals and BPF program behavior, somewhat limiting the attack surface to sophisticated threat actors.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2024-35860 as soon as they become available from their Linux distribution vendors. Specifically, kernel versions incorporating the deferred bpf_link deallocation mechanism should be deployed. For environments where immediate patching is not feasible, organizations should audit their use of BPF programs, particularly those using multi-kprobe, multi-uprobe, and raw_tp links, and consider disabling or limiting these features temporarily. Monitoring kernel logs for unusual BPF-related errors or crashes can help detect exploitation attempts. Additionally, organizations should implement strict access controls to limit who can load or manage BPF programs, as exploitation requires the ability to manipulate BPF links. Employing kernel hardening techniques such as Kernel Page Table Isolation (KPTI) and Control Flow Integrity (CFI) can also reduce the risk of exploitation. Finally, maintaining robust incident response plans and continuous monitoring for kernel anomalies will help mitigate potential impacts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland
CVE-2024-35860: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: support deferring bpf_link dealloc to after RCU grace period BPF link for some program types is passed as a "context" which can be used by those BPF programs to look up additional information. E.g., for multi-kprobes and multi-uprobes, link is used to fetch BPF cookie values. Because of this runtime dependency, when bpf_link refcnt drops to zero there could still be active BPF programs running accessing link data. This patch adds generic support to defer bpf_link dealloc callback to after RCU GP, if requested. This is done by exposing two different deallocation callbacks, one synchronous and one deferred. If deferred one is provided, bpf_link_free() will schedule dealloc_deferred() callback to happen after RCU GP. BPF is using two flavors of RCU: "classic" non-sleepable one and RCU tasks trace one. The latter is used when sleepable BPF programs are used. bpf_link_free() accommodates that by checking underlying BPF program's sleepable flag, and goes either through normal RCU GP only for non-sleepable, or through RCU tasks trace GP *and* then normal RCU GP (taking into account rcu_trace_implies_rcu_gp() optimization), if BPF program is sleepable. We use this for multi-kprobe and multi-uprobe links, which dereference link during program run. We also preventively switch raw_tp link to use deferred dealloc callback, as upcoming changes in bpf-next tree expose raw_tp link data (specifically, cookie value) to BPF program at runtime as well.
AI-Powered Analysis
Technical Analysis
CVE-2024-35860 addresses a vulnerability in the Linux kernel's handling of BPF (Berkeley Packet Filter) links, specifically related to the timing of deallocation of bpf_link objects. BPF programs can use bpf_link as a context to access additional information at runtime, such as cookie values in multi-kprobe and multi-uprobe scenarios. The vulnerability arises because the bpf_link reference count can drop to zero and trigger deallocation while active BPF programs are still running and accessing the link data. This creates a use-after-free condition, potentially leading to memory corruption or kernel crashes. The patch introduces a mechanism to defer the deallocation of bpf_link objects until after the RCU (Read-Copy-Update) grace period, ensuring that no active BPF programs are accessing the link data when it is freed. The patch supports two types of deallocation callbacks: synchronous and deferred. Deferred deallocation schedules the free operation after the appropriate RCU grace period, which varies depending on whether the BPF program is sleepable or non-sleepable. This distinction is important because sleepable BPF programs require a more complex RCU tasks trace grace period before deallocation. The fix is applied to multi-kprobe and multi-uprobe links and preemptively to raw_tp links, anticipating future kernel changes that expose raw_tp link data to BPF programs at runtime. Overall, this vulnerability is a subtle kernel memory management issue that could lead to instability or potential exploitation if an attacker can trigger use-after-free conditions in BPF programs that rely on these links.
Potential Impact
For European organizations, the impact of CVE-2024-35860 could be significant, especially for those relying heavily on Linux-based infrastructure, including servers, cloud environments, and embedded systems. BPF is widely used for networking, security monitoring, and performance tracing, so a vulnerability in its link management can affect critical system components. Exploitation could lead to kernel crashes or memory corruption, potentially causing denial of service or enabling privilege escalation if combined with other vulnerabilities. Organizations running multi-kprobe, multi-uprobe, or raw_tp BPF programs are particularly at risk. Given the widespread use of Linux in European data centers, telecommunications, and industrial control systems, this vulnerability could disrupt services or be leveraged in targeted attacks. However, there are no known exploits in the wild yet, which reduces immediate risk but does not eliminate the need for prompt mitigation. The complexity of the vulnerability means that exploitation requires detailed knowledge of kernel internals and BPF program behavior, somewhat limiting the attack surface to sophisticated threat actors.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2024-35860 as soon as they become available from their Linux distribution vendors. Specifically, kernel versions incorporating the deferred bpf_link deallocation mechanism should be deployed. For environments where immediate patching is not feasible, organizations should audit their use of BPF programs, particularly those using multi-kprobe, multi-uprobe, and raw_tp links, and consider disabling or limiting these features temporarily. Monitoring kernel logs for unusual BPF-related errors or crashes can help detect exploitation attempts. Additionally, organizations should implement strict access controls to limit who can load or manage BPF programs, as exploitation requires the ability to manipulate BPF links. Employing kernel hardening techniques such as Kernel Page Table Isolation (KPTI) and Control Flow Integrity (CFI) can also reduce the risk of exploitation. Finally, maintaining robust incident response plans and continuous monitoring for kernel anomalies will help mitigate potential impacts.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-05-17T13:50:33.107Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d982ac4522896dcbe36a9
Added to database: 5/21/2025, 9:08:58 AM
Last enriched: 6/29/2025, 4:42:34 PM
Last updated: 7/29/2025, 8:46:53 AM
Views: 12
Related Threats
CVE-2025-9002: SQL Injection in Surbowl dormitory-management-php
MediumCVE-2025-9001: Stack-based Buffer Overflow in LemonOS
MediumCVE-2025-8867: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in iqonicdesign Graphina – Elementor Charts and Graphs
MediumCVE-2025-8680: CWE-918 Server-Side Request Forgery (SSRF) in bplugins B Slider- Gutenberg Slider Block for WP
MediumCVE-2025-8676: CWE-200 Exposure of Sensitive Information to an Unauthorized Actor in bplugins B Slider- Gutenberg Slider Block for WP
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.