Skip to main content

CVE-2025-21886: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-21886cvecve-2025-21886
Published: Thu Mar 27 2025 (03/27/2025, 14:57:13 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: RDMA/mlx5: Fix implicit ODP hang on parent deregistration Fix the destroy_unused_implicit_child_mr() to prevent hanging during parent deregistration as of below [1]. Upon entering destroy_unused_implicit_child_mr(), the reference count for the implicit MR parent is incremented using: refcount_inc_not_zero(). A corresponding decrement must be performed if free_implicit_child_mr_work() is not called. The code has been updated to properly manage the reference count that was incremented. [1] INFO: task python3:2157 blocked for more than 120 seconds. Not tainted 6.12.0-rc7+ #1633 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:python3 state:D stack:0 pid:2157 tgid:2157 ppid:1685 flags:0x00000000 Call Trace: <TASK> __schedule+0x420/0xd30 schedule+0x47/0x130 __mlx5_ib_dereg_mr+0x379/0x5d0 [mlx5_ib] ? __pfx_autoremove_wake_function+0x10/0x10 ib_dereg_mr_user+0x5f/0x120 [ib_core] ? lock_release+0xc6/0x280 destroy_hw_idr_uobject+0x1d/0x60 [ib_uverbs] uverbs_destroy_uobject+0x58/0x1d0 [ib_uverbs] uobj_destroy+0x3f/0x70 [ib_uverbs] ib_uverbs_cmd_verbs+0x3e4/0xbb0 [ib_uverbs] ? __pfx_uverbs_destroy_def_handler+0x10/0x10 [ib_uverbs] ? lock_acquire+0xc1/0x2f0 ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0x116/0x170 [ib_uverbs] ? lock_release+0xc6/0x280 ib_uverbs_ioctl+0xe7/0x170 [ib_uverbs] ? ib_uverbs_ioctl+0xcb/0x170 [ib_uverbs] __x64_sys_ioctl+0x1b0/0xa70 ? kmem_cache_free+0x221/0x400 do_syscall_64+0x6b/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f20f21f017b RSP: 002b:00007ffcfc4a77c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffcfc4a78d8 RCX: 00007f20f21f017b RDX: 00007ffcfc4a78c0 RSI: 00000000c0181b01 RDI: 0000000000000003 RBP: 00007ffcfc4a78a0 R08: 000056147d125190 R09: 00007f20f1f14c60 R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffcfc4a7890 R13: 000000000000001c R14: 000056147d100fc0 R15: 00007f20e365c9d0 </TASK>

AI-Powered Analysis

AILast updated: 06/30/2025, 10:24:47 UTC

Technical Analysis

CVE-2025-21886 is a vulnerability identified in the Linux kernel specifically related to the RDMA (Remote Direct Memory Access) subsystem, more precisely within the mlx5 driver component. The issue arises from improper reference count management during the deregistration of parent memory regions (MRs) in the implicit On-Demand Paging (ODP) mechanism. The function destroy_unused_implicit_child_mr() is responsible for cleaning up unused implicit child memory regions, and it increments the reference count of the parent MR using refcount_inc_not_zero(). However, if the corresponding cleanup function free_implicit_child_mr_work() is not invoked, the reference count is not decremented accordingly. This leads to a hang condition during the deregistration process of the parent MR, as the system waits indefinitely for a resource release that never occurs. The kernel logs indicate tasks (e.g., python3 processes) blocked for extended periods (over 120 seconds), evidencing a denial-of-service (DoS) condition caused by this reference count mismanagement. The vulnerability affects specific Linux kernel versions identified by their commit hashes and was publicly disclosed on March 27, 2025. No CVSS score has been assigned yet, and there are no known exploits in the wild at the time of publication. The vulnerability is technical and low-level, impacting kernel memory management in RDMA-enabled environments, which are typically found in high-performance computing, data centers, and enterprise environments utilizing InfiniBand or similar technologies.

Potential Impact

For European organizations, the primary impact of CVE-2025-21886 is the potential for denial-of-service conditions on Linux systems utilizing RDMA with the mlx5 driver. This can cause critical applications relying on RDMA for low-latency, high-throughput communication—such as financial trading platforms, research institutions, cloud service providers, and telecommunications infrastructure—to hang or become unresponsive. The hang occurs during memory region deregistration, potentially leading to resource exhaustion and degraded system availability. Confidentiality and integrity impacts are minimal as the vulnerability does not directly allow unauthorized data access or modification. However, the availability impact can be significant, especially in environments where uptime and performance are critical. European organizations with data centers or HPC clusters running affected Linux kernel versions are at risk of operational disruption. The lack of known exploits reduces immediate risk, but the complexity of the issue means that unpatched systems remain vulnerable to accidental or malicious triggering of the hang condition.

Mitigation Recommendations

To mitigate CVE-2025-21886, European organizations should: 1) Apply the official Linux kernel patches that fix the reference count management in the mlx5 driver as soon as they become available. Monitor Linux kernel mailing lists and vendor advisories for updated kernel releases containing the fix. 2) Identify and inventory systems running affected kernel versions with RDMA mlx5 support enabled, prioritizing critical infrastructure and production environments. 3) Implement monitoring for hung tasks and kernel logs indicating blocked processes related to mlx5_ib_dereg_mr or ib_uverbs components, enabling early detection of potential hangs. 4) Where possible, temporarily disable RDMA mlx5 functionality on non-critical systems until patches are applied, to reduce exposure. 5) Engage with hardware and software vendors to confirm compatibility and support for patched kernels, ensuring smooth upgrade paths. 6) Conduct controlled testing of patched kernels in staging environments to validate stability and performance before wide deployment. 7) Educate system administrators and DevOps teams about the symptoms of this hang condition and response procedures to minimize downtime during incident handling.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.782Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9832c4522896dcbe8b06

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

Last enriched: 6/30/2025, 10:24:47 AM

Last updated: 8/19/2025, 2:18:09 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