CVE-2023-53510: scsi: ufs: core: Fix handling of lrbp->cmd
In the Linux kernel, the following vulnerability has been resolved:
scsi: ufs: core: Fix handling of lrbp->cmd
ufshcdqueuecommand() 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 ufshcdreleasescsicmd(), do not clear lrbp->cmd.
See also scsisendehcmnd().
This commit prevents that the following appears if a command times out:
WARNING: at drivers/ufs/core/ufshcd.c:2965 ufshcdqueuecommand+0x6f8/0x9a8 Call trace: ufshcdqueuecommand+0x6f8/0x9a8 scsisendehcmnd+0x2c0/0x960 scsiehtestdevices+0x100/0x314 scsiehreadydevs+0xd90/0x114c scsierrorhandler+0x2b4/0xb70 kthread+0x16c/0x1e0
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Configuration
Update the UFS SCSI command-handling code so command-submission functions do not check the old lrbp->cmd value and error paths do not clear lrbp->cmd.
Linux kernel SCSI UFS core lrbp->cmd handling = Do not check the old value of lrbp->cmd in command-submission functions, and do not clear lrbp->cmd in ufshcd_release_scsi_cmd() or error paths
Event History
Frequently Asked Questions
What is the severity of CVE-2023-53510?
CVE-2023-53510 has been classified as a moderate severity vulnerability in the Linux kernel.
How do I fix CVE-2023-53510?
To fix CVE-2023-53510, you should update your Linux kernel to the latest version where the vulnerability has been resolved.
What are the potential impacts of CVE-2023-53510?
The potential impacts of CVE-2023-53510 include improper handling of SCSI commands, which could lead to unexpected behavior or crashes.
Which versions of the Linux kernel are affected by CVE-2023-53510?
CVE-2023-53510 affects certain versions of the Linux kernel that include the vulnerable handling of SCSI commands.
Is CVE-2023-53510 being actively exploited in the wild?
As of now, there are no confirmed reports of CVE-2023-53510 being exploited in the wild.