Skip to main content

CVE-2024-50098: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-50098cvecve-2024-50098
Published: Tue Nov 05 2024 (11/05/2024, 17:07:36 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: scsi: ufs: core: Set SDEV_OFFLINE when UFS is shut down There is a history of deadlock if reboot is performed at the beginning of booting. SDEV_QUIESCE was set for all LU's scsi_devices by UFS shutdown, and at that time the audio driver was waiting on blk_mq_submit_bio() holding a mutex_lock while reading the fw binary. After that, a deadlock issue occurred while audio driver shutdown was waiting for mutex_unlock of blk_mq_submit_bio(). To solve this, set SDEV_OFFLINE for all LUs except WLUN, so that any I/O that comes down after a UFS shutdown will return an error. [ 31.907781]I[0: swapper/0: 0] 1 130705007 1651079834 11289729804 0 D( 2) 3 ffffff882e208000 * init [device_shutdown] [ 31.907793]I[0: swapper/0: 0] Mutex: 0xffffff8849a2b8b0: owner[0xffffff882e28cb00 kworker/6:0 :49] [ 31.907806]I[0: swapper/0: 0] Call trace: [ 31.907810]I[0: swapper/0: 0] __switch_to+0x174/0x338 [ 31.907819]I[0: swapper/0: 0] __schedule+0x5ec/0x9cc [ 31.907826]I[0: swapper/0: 0] schedule+0x7c/0xe8 [ 31.907834]I[0: swapper/0: 0] schedule_preempt_disabled+0x24/0x40 [ 31.907842]I[0: swapper/0: 0] __mutex_lock+0x408/0xdac [ 31.907849]I[0: swapper/0: 0] __mutex_lock_slowpath+0x14/0x24 [ 31.907858]I[0: swapper/0: 0] mutex_lock+0x40/0xec [ 31.907866]I[0: swapper/0: 0] device_shutdown+0x108/0x280 [ 31.907875]I[0: swapper/0: 0] kernel_restart+0x4c/0x11c [ 31.907883]I[0: swapper/0: 0] __arm64_sys_reboot+0x15c/0x280 [ 31.907890]I[0: swapper/0: 0] invoke_syscall+0x70/0x158 [ 31.907899]I[0: swapper/0: 0] el0_svc_common+0xb4/0xf4 [ 31.907909]I[0: swapper/0: 0] do_el0_svc+0x2c/0xb0 [ 31.907918]I[0: swapper/0: 0] el0_svc+0x34/0xe0 [ 31.907928]I[0: swapper/0: 0] el0t_64_sync_handler+0x68/0xb4 [ 31.907937]I[0: swapper/0: 0] el0t_64_sync+0x1a0/0x1a4 [ 31.908774]I[0: swapper/0: 0] 49 0 11960702 11236868007 0 D( 2) 6 ffffff882e28cb00 * kworker/6:0 [__bio_queue_enter] [ 31.908783]I[0: swapper/0: 0] Call trace: [ 31.908788]I[0: swapper/0: 0] __switch_to+0x174/0x338 [ 31.908796]I[0: swapper/0: 0] __schedule+0x5ec/0x9cc [ 31.908803]I[0: swapper/0: 0] schedule+0x7c/0xe8 [ 31.908811]I[0: swapper/0: 0] __bio_queue_enter+0xb8/0x178 [ 31.908818]I[0: swapper/0: 0] blk_mq_submit_bio+0x194/0x67c [ 31.908827]I[0: swapper/0: 0] __submit_bio+0xb8/0x19c

AI-Powered Analysis

AILast updated: 06/28/2025, 17:11:16 UTC

Technical Analysis

CVE-2024-50098 is a vulnerability identified in the Linux kernel's handling of the Universal Flash Storage (UFS) subsystem, specifically related to the SCSI (Small Computer System Interface) layer. The issue arises during the shutdown sequence of the UFS device, where Logical Units (LUs) are transitioned to a quiescent state (SDEV_QUIESCE). During early boot or reboot, if the system attempts to shut down UFS devices, the audio driver may concurrently attempt to read firmware binaries via blk_mq_submit_bio(), which involves mutex locking. This concurrency can lead to a deadlock condition because the audio driver waits on a mutex held by blk_mq_submit_bio(), while the shutdown process waits for the audio driver to release the mutex, creating a circular wait scenario. The root cause is that the shutdown process sets LUs to SDEV_QUIESCE but does not mark them offline, allowing I/O operations to be queued and block indefinitely. The fix involves setting the SDEV_OFFLINE flag for all LUs except the well-known logical unit (WLUN) during UFS shutdown, ensuring that any I/O requests after shutdown return an error immediately instead of blocking. This change prevents the deadlock by disallowing new I/O operations on the device once it is shut down. The vulnerability affects specific Linux kernel versions identified by commit hashes (b294ff3e34490f36233230e9ca70503d3924a6f3). No known exploits are reported in the wild, and no CVSS score has been assigned yet. The issue primarily impacts systems using UFS storage devices with the Linux kernel, particularly those that perform reboot or shutdown sequences involving UFS devices and have audio drivers that interact with firmware binaries during boot.

Potential Impact

For European organizations, the impact of CVE-2024-50098 could manifest as system instability or unplanned downtime during reboot or shutdown sequences on Linux-based systems utilizing UFS storage. This is particularly relevant for embedded systems, mobile devices, or specialized industrial equipment running Linux kernels with UFS support. Deadlocks during boot can cause prolonged system hangs, delaying recovery or maintenance operations, which may affect critical infrastructure, manufacturing systems, or telecommunications equipment. While the vulnerability does not directly expose confidentiality or integrity risks, the availability impact can be significant in environments requiring high uptime or rapid reboot cycles. Organizations relying on Linux-based appliances or servers with UFS storage may experience operational disruptions. However, since exploitation requires specific timing during boot and involves internal kernel operations, the risk of remote exploitation is low. The lack of known exploits suggests the threat is currently theoretical but should be addressed proactively to avoid potential service interruptions.

Mitigation Recommendations

To mitigate CVE-2024-50098, European organizations should: 1) Apply the latest Linux kernel updates that include the patch setting SDEV_OFFLINE during UFS shutdown to prevent deadlocks. 2) Audit and inventory systems using UFS storage devices and verify kernel versions to identify vulnerable systems. 3) For embedded or specialized devices where kernel updates are challenging, consider vendor firmware updates or workarounds that avoid reboot sequences triggering the deadlock scenario. 4) Implement monitoring for system hangs or delays during reboot/shutdown processes to detect symptoms of this issue early. 5) Coordinate with hardware and software vendors to ensure that audio drivers and storage subsystems are compatible with the patched kernel behavior. 6) In critical environments, schedule controlled reboots and validate system stability post-update to minimize operational impact. 7) Avoid unnecessary reboots during peak operational hours until patches are applied.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-10-21T19:36:19.945Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9825c4522896dcbdff2b

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

Last enriched: 6/28/2025, 5:11:16 PM

Last updated: 8/2/2025, 12:30:48 PM

Views: 16

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