In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Fix SCSI I/O completion and abort handler deadlock
During stress I/O tests with 500+ vports, hard LOCKUP call traces are observed.
CPU A: nativequeuedspinlockslowpath+0x192 rawspinlockirqsave+0x32 lpfchandlefcperr+0x4c6 lpfcfcpiocmdwqecmpl+0x964 lpfcsli4fphandlecqe+0x266 _lpfcsli4processcq+0x105 _lpfcsli4hbaprocesscq+0x3c lpfccqpollhdler+0x16 irqpollsoftirq+0x76 _softirqentrytextstart+0xe4 irqexit+0xf7 do_IRQ+0x7f
CPU B: nativequeuedspinlockslowpath+0x5b rawspinlock+0x1c lpfcaborthandler+0x13e scmdehaborthandler+0x85 processonework+0x1a7 workerthread+0x30 kthread+0x112 retfrom_fork+0x1f
Diagram of lockup:
CPUA CPUB ---- ---- lpfccmd->buflock phba->hbalock lpfccmd->buflock phba->hbalock
Fix by reordering the taking of the lpfccmd->buflock and phba->hbalock in lpfcaborthandler routine so that it tries to take the lpfccmd->buflock first before phba->hbalock.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03cbbd7c2f5ee288f648f4aeedc765a181188553",
"target": {
"function": "lpfc_abort_handler",
"file": "drivers/scsi/lpfc/lpfc_scsi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49536-0758b995",
"digest": {
"length": 3497.0,
"function_hash": "112905195619570719348612669095621557069"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@21c0d469349957b5dc811c41200a2a998996ca8d",
"target": {
"file": "drivers/scsi/lpfc/lpfc_scsi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49536-12c7e941",
"digest": {
"threshold": 0.9,
"line_hashes": [
"81971391766329211861026551401958356247",
"163027377059751623626435415535075037135",
"177417073226429573576677632100062136014",
"292754744626619098044413160565396295150",
"330879366511674337014692610568626650265",
"79938091584027286521123919492426396221",
"23287410539910816071273052240268715158",
"70163233502805665642506037760137469686",
"111680028447861128078327516055115786292",
"57671693224757022947614293853428293492",
"45987509333629924064775190868085130607",
"241784366185690344449530148689320064255",
"107116984310301792063264475096354637512",
"321643348691312650468501198891180255144",
"145179393173248826474894650027462748924",
"80168022806883741334386134592447229588",
"268730331591621771733764393653589922810",
"273603411169182540918156719279276127430",
"223707604749542312548153595497944331473",
"195305056734296031915540432824729709890",
"279224174273380914591113923434437246892",
"93906010829774300983132169641180576709",
"150261672804734586155845730880133903016",
"219978959830507343377207246138630665292",
"53984252171807243186003901660116426530",
"97060614733187461813074227069946304990",
"218648191404010963683794403858989416200",
"3128114217211931428536692435911686970",
"235541455389750308649113717856322631573",
"193797006665678433118848489938667097877",
"192910634381322732801624986520909961080",
"200251440568670459127382904400929599528",
"211965455056590249621556935634023353865",
"172253568487483272729261712639547658186",
"261386744581542501011606017186161922539",
"24818203083141641057284954588320288446",
"255398310725066511428815917974360302751",
"139216944956782736494655831926823671619",
"11336085116378325182163443338794907458",
"142376355465270424864255205961206538771",
"150730439858955595694335849615469544603",
"265519363926938214788336019608645175888",
"45415064616444225318061035235931737901",
"220678545694797931151005674152128522444"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c4eed901285b9cae36a622f32bea3e92490da6c",
"target": {
"file": "drivers/scsi/lpfc/lpfc_scsi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49536-4c3dc87b",
"digest": {
"threshold": 0.9,
"line_hashes": [
"81971391766329211861026551401958356247",
"163027377059751623626435415535075037135",
"177417073226429573576677632100062136014",
"292754744626619098044413160565396295150",
"330879366511674337014692610568626650265",
"79938091584027286521123919492426396221",
"23287410539910816071273052240268715158",
"70163233502805665642506037760137469686",
"111680028447861128078327516055115786292",
"57671693224757022947614293853428293492",
"45987509333629924064775190868085130607",
"241784366185690344449530148689320064255",
"107116984310301792063264475096354637512",
"321643348691312650468501198891180255144",
"145179393173248826474894650027462748924",
"80168022806883741334386134592447229588",
"268730331591621771733764393653589922810",
"273603411169182540918156719279276127430",
"223707604749542312548153595497944331473",
"195305056734296031915540432824729709890",
"279224174273380914591113923434437246892",
"93906010829774300983132169641180576709",
"150261672804734586155845730880133903016",
"219978959830507343377207246138630665292",
"53984252171807243186003901660116426530",
"97060614733187461813074227069946304990",
"218648191404010963683794403858989416200",
"3128114217211931428536692435911686970",
"235541455389750308649113717856322631573",
"193797006665678433118848489938667097877",
"192910634381322732801624986520909961080",
"200251440568670459127382904400929599528",
"211965455056590249621556935634023353865",
"172253568487483272729261712639547658186",
"261386744581542501011606017186161922539",
"24818203083141641057284954588320288446",
"255398310725066511428815917974360302751",
"139216944956782736494655831926823671619",
"11336085116378325182163443338794907458",
"142376355465270424864255205961206538771",
"150730439858955595694335849615469544603",
"265519363926938214788336019608645175888",
"45415064616444225318061035235931737901",
"220678545694797931151005674152128522444"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7625e81de2164a082810e1f27547d388406da610",
"target": {
"file": "drivers/scsi/lpfc/lpfc_scsi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49536-5ac5caea",
"digest": {
"threshold": 0.9,
"line_hashes": [
"81971391766329211861026551401958356247",
"163027377059751623626435415535075037135",
"177417073226429573576677632100062136014",
"292754744626619098044413160565396295150",
"330879366511674337014692610568626650265",
"79938091584027286521123919492426396221",
"23287410539910816071273052240268715158",
"70163233502805665642506037760137469686",
"111680028447861128078327516055115786292",
"57671693224757022947614293853428293492",
"45987509333629924064775190868085130607",
"241784366185690344449530148689320064255",
"107116984310301792063264475096354637512",
"321643348691312650468501198891180255144",
"145179393173248826474894650027462748924",
"80168022806883741334386134592447229588",
"268730331591621771733764393653589922810",
"273603411169182540918156719279276127430",
"223707604749542312548153595497944331473",
"195305056734296031915540432824729709890",
"279224174273380914591113923434437246892",
"93906010829774300983132169641180576709",
"150261672804734586155845730880133903016",
"219978959830507343377207246138630665292",
"53984252171807243186003901660116426530",
"97060614733187461813074227069946304990",
"218648191404010963683794403858989416200",
"3128114217211931428536692435911686970",
"235541455389750308649113717856322631573",
"193797006665678433118848489938667097877",
"192910634381322732801624986520909961080",
"200251440568670459127382904400929599528",
"211965455056590249621556935634023353865",
"172253568487483272729261712639547658186",
"261386744581542501011606017186161922539",
"24818203083141641057284954588320288446",
"255398310725066511428815917974360302751",
"139216944956782736494655831926823671619",
"11336085116378325182163443338794907458",
"142376355465270424864255205961206538771",
"150730439858955595694335849615469544603",
"265519363926938214788336019608645175888",
"45415064616444225318061035235931737901",
"220678545694797931151005674152128522444"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c4eed901285b9cae36a622f32bea3e92490da6c",
"target": {
"function": "lpfc_abort_handler",
"file": "drivers/scsi/lpfc/lpfc_scsi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49536-6916f3d9",
"digest": {
"length": 3497.0,
"function_hash": "112905195619570719348612669095621557069"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@21c0d469349957b5dc811c41200a2a998996ca8d",
"target": {
"function": "lpfc_abort_handler",
"file": "drivers/scsi/lpfc/lpfc_scsi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49536-98bb8f8e",
"digest": {
"length": 3444.0,
"function_hash": "11254789026113602126368693615647081395"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7625e81de2164a082810e1f27547d388406da610",
"target": {
"function": "lpfc_abort_handler",
"file": "drivers/scsi/lpfc/lpfc_scsi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49536-9db0a47e",
"digest": {
"length": 3444.0,
"function_hash": "11254789026113602126368693615647081395"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03cbbd7c2f5ee288f648f4aeedc765a181188553",
"target": {
"file": "drivers/scsi/lpfc/lpfc_scsi.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49536-ef71247c",
"digest": {
"threshold": 0.9,
"line_hashes": [
"81971391766329211861026551401958356247",
"163027377059751623626435415535075037135",
"177417073226429573576677632100062136014",
"292754744626619098044413160565396295150",
"330879366511674337014692610568626650265",
"79938091584027286521123919492426396221",
"23287410539910816071273052240268715158",
"70163233502805665642506037760137469686",
"111680028447861128078327516055115786292",
"57671693224757022947614293853428293492",
"45987509333629924064775190868085130607",
"241784366185690344449530148689320064255",
"107116984310301792063264475096354637512",
"321643348691312650468501198891180255144",
"145179393173248826474894650027462748924",
"80168022806883741334386134592447229588",
"268730331591621771733764393653589922810",
"273603411169182540918156719279276127430",
"223707604749542312548153595497944331473",
"195305056734296031915540432824729709890",
"279224174273380914591113923434437246892",
"93906010829774300983132169641180576709",
"150261672804734586155845730880133903016",
"219978959830507343377207246138630665292",
"53984252171807243186003901660116426530",
"97060614733187461813074227069946304990",
"218648191404010963683794403858989416200",
"3128114217211931428536692435911686970",
"235541455389750308649113717856322631573",
"193797006665678433118848489938667097877",
"192910634381322732801624986520909961080",
"200251440568670459127382904400929599528",
"211965455056590249621556935634023353865",
"172253568487483272729261712639547658186",
"261386744581542501011606017186161922539",
"24818203083141641057284954588320288446",
"255398310725066511428815917974360302751",
"139216944956782736494655831926823671619",
"11336085116378325182163443338794907458",
"142376355465270424864255205961206538771",
"150730439858955595694335849615469544603",
"265519363926938214788336019608645175888",
"45415064616444225318061035235931737901",
"220678545694797931151005674152128522444"
]
},
"signature_type": "Line"
}
]