Skip to main content

CVE-2025-37884: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2025-37884cvecve-2025-37884
Published: Fri May 09 2025 (05/09/2025, 06:45:47 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix deadlock between rcu_tasks_trace and event_mutex. Fix the following deadlock: CPU A _free_event() perf_kprobe_destroy() mutex_lock(&event_mutex) perf_trace_event_unreg() synchronize_rcu_tasks_trace() There are several paths where _free_event() grabs event_mutex and calls sync_rcu_tasks_trace. Above is one such case. CPU B bpf_prog_test_run_syscall() rcu_read_lock_trace() bpf_prog_run_pin_on_cpu() bpf_prog_load() bpf_tracing_func_proto() trace_set_clr_event() mutex_lock(&event_mutex) Delegate trace_set_clr_event() to workqueue to avoid such lock dependency.

AI-Powered Analysis

AILast updated: 07/04/2025, 01:10:18 UTC

Technical Analysis

CVE-2025-37884 is a concurrency vulnerability in the Linux kernel related to the Berkeley Packet Filter (BPF) subsystem, specifically involving a deadlock condition between two kernel synchronization mechanisms: rcu_tasks_trace and event_mutex. The issue arises when two CPUs attempt to acquire locks in conflicting orders, leading to a circular wait and thus a deadlock. On CPU A, the function _free_event() calls perf_kprobe_destroy(), which attempts to acquire event_mutex and then calls synchronize_rcu_tasks_trace(), a blocking call that waits for ongoing RCU read-side critical sections to complete. Meanwhile, on CPU B, the bpf_prog_test_run_syscall() path acquires rcu_read_lock_trace() and then attempts to lock event_mutex within trace_set_clr_event(). This lock acquisition order inversion causes a deadlock scenario. The fix involves delegating trace_set_clr_event() work to a kernel workqueue, thereby avoiding the problematic lock dependency and preventing the deadlock. This vulnerability affects Linux kernel versions identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and likely impacts all distributions using affected kernel versions. Since the vulnerability is a deadlock, it primarily affects system availability by causing kernel hangs or freezes under certain workloads involving BPF tracing and perf events. There are no known exploits in the wild as of the publication date, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to system stability and availability. Linux is widely deployed across European enterprises, government agencies, and critical infrastructure, especially in servers, cloud environments, and embedded systems. Systems that heavily utilize BPF for tracing, monitoring, or security (e.g., performance analysis tools, observability platforms) may experience kernel deadlocks leading to system hangs or crashes. This can disrupt business operations, cause downtime, and impact services reliant on Linux-based infrastructure. Although this vulnerability does not directly compromise confidentiality or integrity, denial of service through kernel deadlocks can have significant operational and reputational consequences. Organizations running custom or older Linux kernels without the patch are at higher risk. The absence of known exploits reduces immediate threat but does not eliminate risk, especially in complex environments where BPF tracing is common.

Mitigation Recommendations

1. Apply the official Linux kernel patch that delegates trace_set_clr_event() to a workqueue to break the lock dependency and prevent deadlocks. Ensure all Linux systems are updated to kernel versions including this fix. 2. For organizations unable to immediately patch, consider disabling or limiting BPF tracing and perf event features temporarily to reduce exposure. 3. Monitor system logs and kernel messages for signs of deadlocks or hangs related to perf or BPF tracing activities. 4. Implement robust system monitoring and automated recovery mechanisms (e.g., watchdog timers, automated reboots) to minimize downtime in case of deadlocks. 5. Test kernel updates in staging environments to verify stability and compatibility with existing BPF-based tools before production deployment. 6. Educate system administrators and DevOps teams about this vulnerability and the importance of timely patching, especially in environments using advanced tracing features.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-04-16T04:51:23.962Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9818c4522896dcbd7be9

Added to database: 5/21/2025, 9:08:40 AM

Last enriched: 7/4/2025, 1:10:18 AM

Last updated: 8/15/2025, 7:33:40 AM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats