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 ufshcdreleasescsi_cmd(), do not clear lrbp->cmd.
See also scsisendeh_cmnd().
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 scsierror_handler+0x2b4/0xb70 kthread+0x16c/0x1e0
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53510.json",
"cna_assigner": "Linux"
}[
{
"id": "CVE-2023-53510-0efdae1c",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@49234a401e161a2f2698f4612ab792c49b3cad1b",
"target": {
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"189662731695451904796587631131242499945",
"321684891648679288549415400090387835652",
"329641783000103813307731898800704265537",
"334882617492391740881683662216073326387",
"241197229745508698630853262941192833845",
"9725688652705720861331893723013940912",
"327058759632058321012187487990319296292",
"204286936243217668042119942015388056234",
"333286804221835963864658875597697789375",
"303059304509808756237271326275357154937",
"167811788123337495610564192361248505635",
"237981631715650486123718625280135322949",
"169375825714970792993335987218761101138",
"12436617632121916662900090429775334674",
"146829121651239810012408625057834373114",
"108248410085895360211356147155863353833",
"333286804221835963864658875597697789375",
"248033164755095231454513830361653295891",
"214247639745630034380229913356643381302",
"227424653002581424933977270961305509499",
"159033805092322053276081360057841174174",
"248033164755095231454513830361653295891",
"214247639745630034380229913356643381302",
"168355849320193754980438801517639862302"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2023-53510-20c41b9f",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3ee24af62681b942bbd799ac77b90a6d7e1fdb1",
"target": {
"function": "ufshcd_release_scsi_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 171.0,
"function_hash": "239727190271023588571131644930280658895"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-2dc34e87",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3ee24af62681b942bbd799ac77b90a6d7e1fdb1",
"target": {
"function": "ufshcd_queuecommand",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1716.0,
"function_hash": "86272306309290112835681871142346311546"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-48e828e4",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@549e91a9bbaa0ee480f59357868421a61d369770",
"target": {
"function": "ufshcd_advanced_rpmb_req_handler",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1678.0,
"function_hash": "184569510684931436027300008070764839628"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-5678f042",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@549e91a9bbaa0ee480f59357868421a61d369770",
"target": {
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"189662731695451904796587631131242499945",
"321684891648679288549415400090387835652",
"329641783000103813307731898800704265537",
"334882617492391740881683662216073326387",
"241197229745508698630853262941192833845",
"9725688652705720861331893723013940912",
"327058759632058321012187487990319296292",
"204286936243217668042119942015388056234",
"333286804221835963864658875597697789375",
"303059304509808756237271326275357154937",
"167811788123337495610564192361248505635",
"237981631715650486123718625280135322949",
"169375825714970792993335987218761101138",
"12436617632121916662900090429775334674",
"146829121651239810012408625057834373114",
"108248410085895360211356147155863353833",
"333286804221835963864658875597697789375",
"248033164755095231454513830361653295891",
"214247639745630034380229913356643381302",
"227424653002581424933977270961305509499",
"159033805092322053276081360057841174174",
"248033164755095231454513830361653295891",
"214247639745630034380229913356643381302",
"168355849320193754980438801517639862302"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2023-53510-5b2b63aa",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3ee24af62681b942bbd799ac77b90a6d7e1fdb1",
"target": {
"function": "ufshcd_exec_dev_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 761.0,
"function_hash": "121162115150036029892928362698078742832"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-6b21c7c8",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3ee24af62681b942bbd799ac77b90a6d7e1fdb1",
"target": {
"function": "ufshcd_advanced_rpmb_req_handler",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1678.0,
"function_hash": "184569510684931436027300008070764839628"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-6c981762",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@49234a401e161a2f2698f4612ab792c49b3cad1b",
"target": {
"function": "ufshcd_exec_dev_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 761.0,
"function_hash": "121162115150036029892928362698078742832"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-71a40e87",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@49234a401e161a2f2698f4612ab792c49b3cad1b",
"target": {
"function": "ufshcd_issue_devman_upiu_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1876.0,
"function_hash": "310833722827841080663702413033712069572"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-7adfad8c",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@49234a401e161a2f2698f4612ab792c49b3cad1b",
"target": {
"function": "ufshcd_release_scsi_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 171.0,
"function_hash": "239727190271023588571131644930280658895"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-7eb2a2d2",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@549e91a9bbaa0ee480f59357868421a61d369770",
"target": {
"function": "ufshcd_release_scsi_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 171.0,
"function_hash": "239727190271023588571131644930280658895"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-814f3975",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3ee24af62681b942bbd799ac77b90a6d7e1fdb1",
"target": {
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"189662731695451904796587631131242499945",
"321684891648679288549415400090387835652",
"329641783000103813307731898800704265537",
"334882617492391740881683662216073326387",
"241197229745508698630853262941192833845",
"9725688652705720861331893723013940912",
"327058759632058321012187487990319296292",
"204286936243217668042119942015388056234",
"333286804221835963864658875597697789375",
"303059304509808756237271326275357154937",
"167811788123337495610564192361248505635",
"237981631715650486123718625280135322949",
"169375825714970792993335987218761101138",
"12436617632121916662900090429775334674",
"146829121651239810012408625057834373114",
"108248410085895360211356147155863353833",
"333286804221835963864658875597697789375",
"248033164755095231454513830361653295891",
"214247639745630034380229913356643381302",
"227424653002581424933977270961305509499",
"159033805092322053276081360057841174174",
"248033164755095231454513830361653295891",
"214247639745630034380229913356643381302",
"168355849320193754980438801517639862302"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2023-53510-8a4ca3c1",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@549e91a9bbaa0ee480f59357868421a61d369770",
"target": {
"function": "ufshcd_issue_devman_upiu_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1876.0,
"function_hash": "310833722827841080663702413033712069572"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-b80111d9",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@549e91a9bbaa0ee480f59357868421a61d369770",
"target": {
"function": "ufshcd_queuecommand",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1716.0,
"function_hash": "86272306309290112835681871142346311546"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-c3cc8714",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3ee24af62681b942bbd799ac77b90a6d7e1fdb1",
"target": {
"function": "ufshcd_issue_devman_upiu_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1876.0,
"function_hash": "310833722827841080663702413033712069572"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-d4704e43",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@549e91a9bbaa0ee480f59357868421a61d369770",
"target": {
"function": "ufshcd_exec_dev_cmd",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 761.0,
"function_hash": "121162115150036029892928362698078742832"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-dc454bc1",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@49234a401e161a2f2698f4612ab792c49b3cad1b",
"target": {
"function": "ufshcd_advanced_rpmb_req_handler",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1678.0,
"function_hash": "184569510684931436027300008070764839628"
},
"signature_type": "Function"
},
{
"id": "CVE-2023-53510-f1ebc58d",
"signature_version": "v1",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@49234a401e161a2f2698f4612ab792c49b3cad1b",
"target": {
"function": "ufshcd_queuecommand",
"file": "drivers/ufs/core/ufshcd.c"
},
"digest": {
"length": 1716.0,
"function_hash": "86272306309290112835681871142346311546"
},
"signature_type": "Function"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53510.json"