CVE-2023-53510 in Linuxinfo

Summary

by MITRE • 10/01/2025

In the Linux kernel, the following vulnerability has been resolved:

scsi: ufs: core: Fix handling of lrbp->cmd

ufshcd_queuecommand() may be called two times in a row for a SCSI command before it is completed. Hence make the following changes:

- In the functions that submit a command, do not check the old value of lrbp->cmd nor clear lrbp->cmd in error paths.

- In ufshcd_release_scsi_cmd(), do not clear lrbp->cmd.

See also scsi_send_eh_cmnd().

This commit prevents that the following appears if a command times out:

WARNING: at drivers/ufs/core/ufshcd.c:2965 ufshcd_queuecommand+0x6f8/0x9a8 Call trace: ufshcd_queuecommand+0x6f8/0x9a8 scsi_send_eh_cmnd+0x2c0/0x960 scsi_eh_test_devices+0x100/0x314 scsi_eh_ready_devs+0xd90/0x114c scsi_error_handler+0x2b4/0xb70 kthread+0x16c/0x1e0

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 05/03/2026

The vulnerability described in CVE-2023-53510 resides within the Linux kernel's Universal Flash Storage (UFS) subsystem, specifically in the SCSI command handling mechanisms. This issue manifests in the ufs core driver where the scsi_send_eh_cmnd() function can be invoked multiple times for the same SCSI command before completion. The problem stems from improper handling of the lrbp->cmd field which represents the local request block pointer command structure. When commands are processed in rapid succession without proper state management, race conditions and inconsistent command state tracking occur. The vulnerability represents a classic case of improper resource management where command state variables are not properly maintained across multiple execution paths, leading to potential memory corruption or command execution errors.

The technical flaw involves the incorrect handling of command submission and release operations within the UFS host controller driver. Specifically, the ufshcd_queuecommand() function can be called consecutively for the same SCSI command without proper synchronization or state validation. This creates a scenario where the lrbp->cmd field gets overwritten or cleared prematurely during error handling paths, causing the system to lose track of active commands. The root cause lies in the failure to maintain consistent command state management across multiple command submission attempts, particularly when error conditions occur. This violates fundamental principles of concurrent programming and proper state machine implementation. The issue directly relates to CWE-362, which addresses race conditions in concurrent execution environments, and CWE-755, concerning improper handling of exceptional conditions.

The operational impact of this vulnerability extends to system stability and reliability in storage environments utilizing UFS controllers. When commands timeout or encounter errors, the improper command state handling can lead to kernel warnings, system hangs, or potentially more severe memory corruption issues. The warning message indicates a kernel oops condition occurring at the ufshcd_queuecommand function, which suggests that the kernel's integrity is compromised when commands are processed under error conditions. This vulnerability affects systems where UFS storage controllers are actively used for data operations, particularly in enterprise environments where storage reliability is critical. The consequences include potential data loss, system crashes, and service disruption during error recovery scenarios, as the storage subsystem fails to properly handle command retries and error recovery paths.

Mitigation strategies for this vulnerability focus on proper command state management and ensuring atomic operations during command submission and completion. The fix implemented in the kernel involves modifying the command submission functions to avoid checking or clearing the lrbp->cmd field during error paths, and ensuring that ufshcd_release_scsi_cmd() does not clear the command field. System administrators should prioritize updating to kernel versions containing the patched implementation, as the vulnerability affects the core storage subsystem. Organizations should also implement monitoring for kernel warnings related to UFS operations and establish proper error recovery procedures. The fix aligns with ATT&CK technique T1490, which covers data destruction, as the vulnerability could potentially lead to data integrity issues. Regular kernel updates and security assessments of storage subsystems are essential for maintaining system integrity. Additionally, implementing proper logging and alerting mechanisms can help detect early signs of command handling failures that might precede more serious system issues.

Responsible

Linux

Reservation

10/01/2025

Disclosure

10/01/2025

Moderation

accepted

CPE

ready

EPSS

0.00144

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!