Skip to main content

CVE-2025-37905: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2025-37905cvecve-2025-37905
Published: Tue May 20 2025 (05/20/2025, 15:21:38 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: firmware: arm_scmi: Balance device refcount when destroying devices Using device_find_child() to lookup the proper SCMI device to destroy causes an unbalance in device refcount, since device_find_child() calls an implicit get_device(): this, in turns, inhibits the call of the provided release methods upon devices destruction. As a consequence, one of the structures that is not freed properly upon destruction is the internal struct device_private dev->p populated by the drivers subsystem core. KMemleak detects this situation since loading/unloding some SCMI driver causes related devices to be created/destroyed without calling any device_release method. unreferenced object 0xffff00000f583800 (size 512): comm "insmod", pid 227, jiffies 4294912190 hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ff ff ff ff ff ff 60 36 1d 8a 00 80 ff ff ........`6...... backtrace (crc 114e2eed): kmemleak_alloc+0xbc/0xd8 __kmalloc_cache_noprof+0x2dc/0x398 device_add+0x954/0x12d0 device_register+0x28/0x40 __scmi_device_create.part.0+0x1bc/0x380 scmi_device_create+0x2d0/0x390 scmi_create_protocol_devices+0x74/0xf8 scmi_device_request_notifier+0x1f8/0x2a8 notifier_call_chain+0x110/0x3b0 blocking_notifier_call_chain+0x70/0xb0 scmi_driver_register+0x350/0x7f0 0xffff80000a3b3038 do_one_initcall+0x12c/0x730 do_init_module+0x1dc/0x640 load_module+0x4b20/0x5b70 init_module_from_file+0xec/0x158 $ ./scripts/faddr2line ./vmlinux device_add+0x954/0x12d0 device_add+0x954/0x12d0: kmalloc_noprof at include/linux/slab.h:901 (inlined by) kzalloc_noprof at include/linux/slab.h:1037 (inlined by) device_private_init at drivers/base/core.c:3510 (inlined by) device_add at drivers/base/core.c:3561 Balance device refcount by issuing a put_device() on devices found via device_find_child().

AI-Powered Analysis

AILast updated: 07/04/2025, 01:25:31 UTC

Technical Analysis

CVE-2025-37905 is a vulnerability identified in the Linux kernel related to the handling of device reference counts within the ARM SCMI (System Control and Management Interface) firmware driver subsystem. The root cause is an imbalance in device reference counting when destroying SCMI devices. Specifically, the function device_find_child() is used to locate the SCMI device to be destroyed, but this function implicitly increments the device's reference count via get_device() without a corresponding decrement (put_device()) later. This leads to the device's release methods not being called during destruction, resulting in memory not being freed properly. The internal structure device_private dev->p, managed by the drivers subsystem core, is one such object that remains allocated, causing a memory leak. The issue was detected by kmemleak, a kernel memory leak detector, which observed that loading and unloading SCMI drivers creates and destroys devices without invoking their release callbacks. The vulnerability is technical in nature, involving kernel memory management and device lifecycle handling, and affects specific Linux kernel versions identified by the commit hashes listed. The fix involves balancing the device reference count by explicitly calling put_device() on devices found via device_find_child(), ensuring proper cleanup and preventing memory leaks. No known exploits are reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the impact of CVE-2025-37905 depends largely on their use of Linux systems running affected kernel versions with ARM SCMI drivers. The vulnerability causes a memory leak in the kernel, which over time could degrade system performance, lead to resource exhaustion, and potentially cause system instability or crashes. This is particularly relevant for embedded systems, IoT devices, and ARM-based servers or infrastructure components that rely on SCMI for power and system management. While this vulnerability does not directly enable code execution or privilege escalation, the resulting denial of service through resource depletion could disrupt critical services, especially in industrial, telecommunications, or cloud environments prevalent in Europe. Organizations operating ARM-based Linux systems in sectors such as manufacturing, automotive, or telecommunications may face increased operational risks if unpatched. The absence of known exploits suggests limited immediate threat, but the vulnerability's presence in widely used Linux kernels necessitates prompt attention to avoid potential future exploitation or system reliability issues.

Mitigation Recommendations

European organizations should take the following specific mitigation steps: 1) Identify all Linux systems running ARM architectures with SCMI drivers, especially those using the affected kernel versions or commit hashes. 2) Apply the official Linux kernel patches or updates that address CVE-2025-37905 as soon as they become available. 3) For systems where immediate patching is not feasible, implement monitoring for unusual memory consumption or kernel memory leaks using tools like kmemleak or other kernel debugging utilities. 4) Regularly audit device driver usage and lifecycle management in custom or embedded Linux deployments to ensure proper reference counting and resource cleanup. 5) Engage with Linux distribution vendors to track backported fixes and ensure timely deployment of security updates. 6) For critical infrastructure, consider implementing redundancy and failover mechanisms to mitigate potential service disruptions caused by kernel memory leaks. 7) Educate system administrators and developers about the importance of device reference count management in kernel modules to prevent similar issues.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682cd0f71484d88663aeaf56

Added to database: 5/20/2025, 6:59:03 PM

Last enriched: 7/4/2025, 1:25:31 AM

Last updated: 8/12/2025, 8:11:08 AM

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