Skip to main content

CVE-2025-37772: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-37772cvecve-2025-37772
Published: Thu May 01 2025 (05/01/2025, 13:07:12 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: RDMA/cma: Fix workqueue crash in cma_netevent_work_handler struct rdma_cm_id has member "struct work_struct net_work" that is reused for enqueuing cma_netevent_work_handler()s onto cma_wq. Below crash[1] can occur if more than one call to cma_netevent_callback() occurs in quick succession, which further enqueues cma_netevent_work_handler()s for the same rdma_cm_id, overwriting any previously queued work-item(s) that was just scheduled to run i.e. there is no guarantee the queued work item may run between two successive calls to cma_netevent_callback() and the 2nd INIT_WORK would overwrite the 1st work item (for the same rdma_cm_id), despite grabbing id_table_lock during enqueue. Also drgn analysis [2] indicates the work item was likely overwritten. Fix this by moving the INIT_WORK() to __rdma_create_id(), so that it doesn't race with any existing queue_work() or its worker thread. [1] Trimmed crash stack: ============================================= BUG: kernel NULL pointer dereference, address: 0000000000000008 kworker/u256:6 ... 6.12.0-0... Workqueue: cma_netevent_work_handler [rdma_cm] (rdma_cm) RIP: 0010:process_one_work+0xba/0x31a Call Trace: worker_thread+0x266/0x3a0 kthread+0xcf/0x100 ret_from_fork+0x31/0x50 ret_from_fork_asm+0x1a/0x30 ============================================= [2] drgn crash analysis: >>> trace = prog.crashed_thread().stack_trace() >>> trace (0) crash_setup_regs (./arch/x86/include/asm/kexec.h:111:15) (1) __crash_kexec (kernel/crash_core.c:122:4) (2) panic (kernel/panic.c:399:3) (3) oops_end (arch/x86/kernel/dumpstack.c:382:3) ... (8) process_one_work (kernel/workqueue.c:3168:2) (9) process_scheduled_works (kernel/workqueue.c:3310:3) (10) worker_thread (kernel/workqueue.c:3391:4) (11) kthread (kernel/kthread.c:389:9) Line workqueue.c:3168 for this kernel version is in process_one_work(): 3168 strscpy(worker->desc, pwq->wq->name, WORKER_DESC_LEN); >>> trace[8]["work"] *(struct work_struct *)0xffff92577d0a21d8 = { .data = (atomic_long_t){ .counter = (s64)536870912, <=== Note }, .entry = (struct list_head){ .next = (struct list_head *)0xffff924d075924c0, .prev = (struct list_head *)0xffff924d075924c0, }, .func = (work_func_t)cma_netevent_work_handler+0x0 = 0xffffffffc2cec280, } Suspicion is that pwq is NULL: >>> trace[8]["pwq"] (struct pool_workqueue *)<absent> In process_one_work(), pwq is assigned from: struct pool_workqueue *pwq = get_work_pwq(work); and get_work_pwq() is: static struct pool_workqueue *get_work_pwq(struct work_struct *work) { unsigned long data = atomic_long_read(&work->data); if (data & WORK_STRUCT_PWQ) return work_struct_pwq(data); else return NULL; } WORK_STRUCT_PWQ is 0x4: >>> print(repr(prog['WORK_STRUCT_PWQ'])) Object(prog, 'enum work_flags', value=4) But work->data is 536870912 which is 0x20000000. So, get_work_pwq() returns NULL and we crash in process_one_work(): 3168 strscpy(worker->desc, pwq->wq->name, WORKER_DESC_LEN); =============================================

AI-Powered Analysis

AILast updated: 07/03/2025, 23:10:59 UTC

Technical Analysis

CVE-2025-37772 is a vulnerability in the Linux kernel's RDMA (Remote Direct Memory Access) connection management agent (cma) subsystem, specifically related to the handling of workqueue items in the cma_netevent_work_handler function. The issue arises because the struct rdma_cm_id contains a member work_struct net_work that is reused for enqueuing work items onto the cma_wq workqueue. When multiple calls to cma_netevent_callback() occur in rapid succession for the same rdma_cm_id, the INIT_WORK macro is called repeatedly on the same work_struct, overwriting previously queued work items. This leads to a race condition where the queued work item may be overwritten before it is processed, causing the workqueue to dereference a NULL pointer and crash the kernel. The crash stack trace shows a NULL pointer dereference in process_one_work(), triggered by a NULL pool_workqueue pointer (pwq) returned from get_work_pwq() due to corrupted work_struct data. The root cause is that INIT_WORK() is called during cma_netevent_callback(), which races with queue_work() and the worker thread. The fix involves moving the INIT_WORK() call to __rdma_create_id(), ensuring the work_struct is initialized once and preventing concurrent overwrites. This vulnerability can cause kernel crashes (denial of service) on affected Linux systems using RDMA, impacting system stability and availability. No known exploits are reported in the wild as of publication, and no CVSS score is assigned yet.

Potential Impact

For European organizations relying on Linux servers with RDMA capabilities—commonly found in high-performance computing, data centers, and enterprise storage environments—this vulnerability poses a risk of kernel crashes leading to denial of service. Such crashes can disrupt critical services, cause downtime, and potentially lead to data loss if systems become unstable. Organizations using RDMA for low-latency networking or storage access, especially in financial services, telecommunications, research institutions, and cloud providers, may experience operational interruptions. While this vulnerability does not directly lead to privilege escalation or data leakage, the resulting instability could be exploited by attackers to cause persistent service outages or to mask other malicious activities. The lack of authentication requirements and the ability to trigger the crash via rapid successive calls to cma_netevent_callback() increase the risk in multi-tenant or exposed environments. However, exploitation requires triggering specific RDMA network events, limiting the attack surface to systems with RDMA enabled and accessible.

Mitigation Recommendations

European organizations should immediately apply the patch once available that moves the INIT_WORK() call to __rdma_create_id() to prevent the race condition. Until patches are deployed, organizations should consider disabling RDMA functionality if not strictly required, as this will mitigate the risk of triggering the vulnerability. Network segmentation and strict access controls should be enforced to limit exposure of RDMA-enabled systems to untrusted networks or users. Monitoring kernel logs for signs of workqueue crashes or kernel oops events related to rdma_cm can provide early detection of exploitation attempts. Additionally, organizations should review and harden their RDMA configurations, ensuring only trusted hosts can initiate RDMA connections. For critical systems, implementing kernel live patching solutions may reduce downtime during patch deployment. Finally, maintain up-to-date Linux kernel versions and subscribe to vendor security advisories for timely updates.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9832c4522896dcbe83aa

Added to database: 5/21/2025, 9:09:06 AM

Last enriched: 7/3/2025, 11:10:59 PM

Last updated: 8/13/2025, 6:00:41 PM

Views: 15

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