Skip to main content

CVE-2025-37828: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2025-37828cvecve-2025-37828
Published: Thu May 08 2025 (05/08/2025, 06:26:20 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: scsi: ufs: mcq: Add NULL check in ufshcd_mcq_abort() A race can occur between the MCQ completion path and the abort handler: once a request completes, __blk_mq_free_request() sets rq->mq_hctx to NULL, meaning the subsequent ufshcd_mcq_req_to_hwq() call in ufshcd_mcq_abort() can return a NULL pointer. If this NULL pointer is dereferenced, the kernel will crash. Add a NULL check for the returned hwq pointer. If hwq is NULL, log an error and return FAILED, preventing a potential NULL-pointer dereference. As suggested by Bart, the ufshcd_cmd_inflight() check is removed. This is similar to the fix in commit 74736103fb41 ("scsi: ufs: core: Fix ufshcd_abort_one racing issue"). This is found by our static analysis tool KNighter.

AI-Powered Analysis

AILast updated: 07/04/2025, 00:10:52 UTC

Technical Analysis

CVE-2025-37828 is a vulnerability identified in the Linux kernel specifically affecting the SCSI UFS (Universal Flash Storage) multi-queue (MCQ) subsystem. The issue arises from a race condition between the MCQ completion path and the abort handler. When a request completes, the function __blk_mq_free_request() sets the request's mq_hctx pointer to NULL. Subsequently, the ufshcd_mcq_abort() function calls ufshcd_mcq_req_to_hwq() which can return a NULL pointer if the hardware queue (hwq) has already been freed or is no longer valid. If this NULL pointer is dereferenced, it leads to a kernel crash, effectively causing a denial of service. The fix involves adding a NULL check for the hwq pointer in ufshcd_mcq_abort(). If hwq is NULL, the kernel logs an error and returns a failure code, preventing the NULL-pointer dereference and crash. This vulnerability is similar to a previously fixed race condition in the UFS core abort handling. It was discovered using the static analysis tool KNighter. The vulnerability affects certain Linux kernel versions identified by specific commit hashes. There are no known exploits in the wild at the time of publication, and no CVSS score has been assigned yet.

Potential Impact

For European organizations relying on Linux-based systems, especially those using devices with UFS storage and multi-queue SCSI subsystems (common in embedded systems, mobile devices, and some server environments), this vulnerability could lead to system instability or denial of service due to kernel crashes. Such crashes could disrupt critical services, data processing, or operational continuity. While the vulnerability does not appear to allow privilege escalation or data leakage directly, the denial of service impact can be significant in environments requiring high availability, such as financial institutions, healthcare providers, and industrial control systems prevalent in Europe. The lack of known exploits reduces immediate risk, but the potential for targeted attacks exploiting this race condition remains, especially in environments where attackers can induce aborts or manipulate SCSI requests. The impact is primarily on system availability and reliability.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernel to versions that include the patch addressing CVE-2025-37828. Since the fix involves a NULL pointer check in the kernel code, applying the official kernel updates or backported patches from trusted Linux distributions is essential. Organizations using custom or embedded Linux kernels should ensure their maintainers integrate this fix promptly. Additionally, system administrators should monitor kernel logs for error messages related to ufshcd_mcq_abort() to detect potential exploitation attempts or instability. Implementing strict access controls to limit who can issue SCSI commands or abort requests can reduce the risk of exploitation. For critical systems, consider deploying kernel live patching solutions to apply fixes without downtime. Finally, conduct thorough testing of updated kernels in staging environments to ensure stability before production deployment.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9819c4522896dcbd888d

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

Last enriched: 7/4/2025, 12:10:52 AM

Last updated: 8/3/2025, 3:55:35 PM

Views: 13

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