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.170-1Fixed in 6.4.4-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.170-1~deb11u1 - Compensating control
In the functions that submit a command, do not check the old value of lrbp->cmd or clear it in error paths; in ufshcd_release_scsi_cmd(), do not clear lrbp->cmd.
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.