In the Linux kernel, the following vulnerability has been resolved:
scsi: ufs: core: Remove SCSI host only if added
If host tries to remove ufshcd driver from a UFS device it would cause a kernel panic if ufshcdasyncscan fails during ufshcdprobehba before adding a SCSI host with scsiaddhost and MCQ is enabled since SCSI host has been defered after MCQ configuration introduced by commit 0cab4023ec7b ("scsi: ufs: core: Defer adding host to SCSI if MCQ is supported").
To guarantee that SCSI host is removed only if it has been added, set the scsihostadded flag to true after adding a SCSI host and check whether it is set or not before removing it.
[
{
"digest": {
"line_hashes": [
"111546547245746906288789565155421553310",
"138083082231193833754291144100535772702",
"94493838131217671593983911562057346071",
"158352577355581753984159098542272980037",
"154717263137701410297681803541168901768",
"235952879257608377207039917540510518203",
"163179339581027475553906552443465079991",
"75216864321240538068760518094080836353",
"312562440971974443603299146341130338627",
"97973824213435725820053022752272003394",
"79786388409430833995873911721492563693",
"5373770484292972939131922527671526387"
],
"threshold": 0.9
},
"target": {
"file": "drivers/ufs/core/ufshcd.c"
},
"deprecated": false,
"id": "CVE-2024-46843-07dac3c3",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7cbff570dbe8907e23bba06f6414899a0fbb2fcc",
"signature_type": "Line"
},
{
"digest": {
"length": 378.0,
"function_hash": "116750285680960752662983629366288287627"
},
"target": {
"file": "drivers/ufs/core/ufshcd.c",
"function": "ufshcd_remove"
},
"deprecated": false,
"id": "CVE-2024-46843-6374b0f0",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7cbff570dbe8907e23bba06f6414899a0fbb2fcc",
"signature_type": "Function"
},
{
"digest": {
"length": 4400.0,
"function_hash": "58320422025605538584985804863263495670"
},
"target": {
"file": "drivers/ufs/core/ufshcd.c",
"function": "ufshcd_init"
},
"deprecated": false,
"id": "CVE-2024-46843-8e71c822",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7cbff570dbe8907e23bba06f6414899a0fbb2fcc",
"signature_type": "Function"
}
]