In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Move cfglogverbose check before calling lpfcdmpdbg()
In an attempt to log message 0126 with LOGTRACEEVENT, the following hard lockup call trace hangs the system.
Call Trace: rawspinlockirqsave+0x32/0x40 lpfcdmpdbg.part.32+0x28/0x220 [lpfc] lpfccmplelsfdisc+0x145/0x460 [lpfc] lpfcslicanceljobs+0x92/0xd0 [lpfc] lpfcelsflushcmd+0x43c/0x670 [lpfc] lpfcelsflushallcmd+0x37/0x60 [lpfc] lpfcsli4asynceventproc+0x956/0x1720 [lpfc] lpfcdowork+0x1485/0x1d70 [lpfc] kthread+0x112/0x130 retfrom_fork+0x1f/0x40 Kernel panic - not syncing: Hard LOCKUP
The same CPU tries to claim the phba->portlistlock twice.
Move the cfglogverbose checks as part of the lpfcprintfvlog() and lpfcprintflog() macros before calling lpfcdmpdbg(). There is no need to take the phba->portlistlock within lpfcdmpdbg().
{ "vanir_signatures": [ { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/scsi/lpfc/lpfc_init.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "289372217451923260845681706731193775027", "97400512455635231740366698813732299217", "330051385018329221394190935400992605763", "110583547922014248695732317241667186736", "205513029897664707681592211343433698897", "35270236123730949773299967360283465741", "203492242236987589899148197482379548020", "299546215178538112790547402125052649314", "329304238466207840406633601798960337148", "212058562851787839116939421948922725112", "232055187036394520748901441260332266220", "318967809660861474590035650304569698525", "274845421230466051422951342333846005093", "277054006294812816295007998439375026104", "24340410637202451607933363879877290926", "109689099390765884304537136997291640626", "63626019788771857632921425270183120176", "37640457849374893056630136594091429876", "4988455696754985860249130822711291898", "293949540968280903538352693917672011553", "71756188867953770688714389947779411326", "194400319002197564151609626352812339253", "180514054759415145536079912356412211138", "103290984374794228198840215234635662808" ], "threshold": 0.9 }, "id": "CVE-2022-49542-006b6f03", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e294647b1aed4247fe52851f3a3b2b19ae906228" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/scsi/lpfc/lpfc_logmsg.h" }, "signature_version": "v1", "digest": { "line_hashes": [ "62463167203912278503052872101195797982", "78524356138563809111531636623747529265", "301552106970123299321465129516880127790", "225620911814696839816101794268549466261", "155970578969905340290292235931234040240", "101553225643451846388718256472415097523", "327817999395227952476323069910811777452", "174208235211500537262892631192763328816", "337931604118256267093044641119615113500", "300985952100688095365872778546700959063", "113930489943357373664776619421839484241", "190125774280432728364235736098594982592" ], "threshold": 0.9 }, "id": "CVE-2022-49542-0faf47c9", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09c772557a4fd9490fed1bfb133268313ea22213" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/scsi/lpfc/lpfc_logmsg.h" }, "signature_version": "v1", "digest": { "line_hashes": [ "62463167203912278503052872101195797982", "78524356138563809111531636623747529265", "301552106970123299321465129516880127790", "225620911814696839816101794268549466261", "155970578969905340290292235931234040240", "101553225643451846388718256472415097523", "327817999395227952476323069910811777452", "174208235211500537262892631192763328816", "337931604118256267093044641119615113500", "300985952100688095365872778546700959063", "113930489943357373664776619421839484241", "190125774280432728364235736098594982592" ], "threshold": 0.9 }, "id": "CVE-2022-49542-3a42041b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc6501afccec55b8b6c90584cbf71f1fefa77d1e" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/scsi/lpfc/lpfc_init.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "289372217451923260845681706731193775027", "97400512455635231740366698813732299217", "330051385018329221394190935400992605763", "110583547922014248695732317241667186736", "205513029897664707681592211343433698897", "35270236123730949773299967360283465741", "203492242236987589899148197482379548020", "299546215178538112790547402125052649314", "329304238466207840406633601798960337148", "212058562851787839116939421948922725112", "232055187036394520748901441260332266220", "318967809660861474590035650304569698525", "274845421230466051422951342333846005093", "277054006294812816295007998439375026104", "24340410637202451607933363879877290926", "109689099390765884304537136997291640626", "63626019788771857632921425270183120176", "37640457849374893056630136594091429876", "4988455696754985860249130822711291898", "293949540968280903538352693917672011553", "71756188867953770688714389947779411326", "194400319002197564151609626352812339253", "180514054759415145536079912356412211138", "103290984374794228198840215234635662808" ], "threshold": 0.9 }, "id": "CVE-2022-49542-45a2d3c4", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@271725e4028559ae7974d762a8467dc9de412f2e" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/scsi/lpfc/lpfc_logmsg.h" }, "signature_version": "v1", "digest": { "line_hashes": [ "62463167203912278503052872101195797982", "78524356138563809111531636623747529265", "301552106970123299321465129516880127790", "225620911814696839816101794268549466261", "155970578969905340290292235931234040240", "101553225643451846388718256472415097523", "327817999395227952476323069910811777452", "174208235211500537262892631192763328816", "337931604118256267093044641119615113500", "300985952100688095365872778546700959063", "113930489943357373664776619421839484241", "190125774280432728364235736098594982592" ], "threshold": 0.9 }, "id": "CVE-2022-49542-4d8def79", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@271725e4028559ae7974d762a8467dc9de412f2e" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/scsi/lpfc/lpfc_init.c", "function": "lpfc_dmp_dbg" }, "signature_version": "v1", "digest": { "length": 1645.0, "function_hash": "88588690604393993258938099477399581953" }, "id": "CVE-2022-49542-5e58ebb5", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09c772557a4fd9490fed1bfb133268313ea22213" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/scsi/lpfc/lpfc_init.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "289372217451923260845681706731193775027", "97400512455635231740366698813732299217", "330051385018329221394190935400992605763", "110583547922014248695732317241667186736", "205513029897664707681592211343433698897", "35270236123730949773299967360283465741", "203492242236987589899148197482379548020", "299546215178538112790547402125052649314", "329304238466207840406633601798960337148", "212058562851787839116939421948922725112", "232055187036394520748901441260332266220", "318967809660861474590035650304569698525", "274845421230466051422951342333846005093", "277054006294812816295007998439375026104", "24340410637202451607933363879877290926", "109689099390765884304537136997291640626", "63626019788771857632921425270183120176", "37640457849374893056630136594091429876", "4988455696754985860249130822711291898", "293949540968280903538352693917672011553", "71756188867953770688714389947779411326", "194400319002197564151609626352812339253", "180514054759415145536079912356412211138", "103290984374794228198840215234635662808" ], "threshold": 0.9 }, "id": "CVE-2022-49542-8815a4a2", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09c772557a4fd9490fed1bfb133268313ea22213" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/scsi/lpfc/lpfc_logmsg.h" }, "signature_version": "v1", "digest": { "line_hashes": [ "62463167203912278503052872101195797982", "78524356138563809111531636623747529265", "301552106970123299321465129516880127790", "225620911814696839816101794268549466261", "155970578969905340290292235931234040240", "101553225643451846388718256472415097523", "327817999395227952476323069910811777452", "174208235211500537262892631192763328816", "337931604118256267093044641119615113500", "300985952100688095365872778546700959063", "113930489943357373664776619421839484241", "190125774280432728364235736098594982592" ], "threshold": 0.9 }, "id": "CVE-2022-49542-b1818ed1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e294647b1aed4247fe52851f3a3b2b19ae906228" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/scsi/lpfc/lpfc_init.c", "function": "lpfc_dmp_dbg" }, "signature_version": "v1", "digest": { "length": 1645.0, "function_hash": "88588690604393993258938099477399581953" }, "id": "CVE-2022-49542-c5bd87f4", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@271725e4028559ae7974d762a8467dc9de412f2e" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/scsi/lpfc/lpfc_init.c", "function": "lpfc_dmp_dbg" }, "signature_version": "v1", "digest": { "length": 1645.0, "function_hash": "88588690604393993258938099477399581953" }, "id": "CVE-2022-49542-cb33ab04", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc6501afccec55b8b6c90584cbf71f1fefa77d1e" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/scsi/lpfc/lpfc_init.c", "function": "lpfc_dmp_dbg" }, "signature_version": "v1", "digest": { "length": 1645.0, "function_hash": "88588690604393993258938099477399581953" }, "id": "CVE-2022-49542-cf9c67a1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e294647b1aed4247fe52851f3a3b2b19ae906228" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/scsi/lpfc/lpfc_init.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "289372217451923260845681706731193775027", "97400512455635231740366698813732299217", "330051385018329221394190935400992605763", "110583547922014248695732317241667186736", "205513029897664707681592211343433698897", "35270236123730949773299967360283465741", "203492242236987589899148197482379548020", "299546215178538112790547402125052649314", "329304238466207840406633601798960337148", "212058562851787839116939421948922725112", "232055187036394520748901441260332266220", "318967809660861474590035650304569698525", "274845421230466051422951342333846005093", "277054006294812816295007998439375026104", "24340410637202451607933363879877290926", "109689099390765884304537136997291640626", "63626019788771857632921425270183120176", "37640457849374893056630136594091429876", "4988455696754985860249130822711291898", "293949540968280903538352693917672011553", "71756188867953770688714389947779411326", "194400319002197564151609626352812339253", "180514054759415145536079912356412211138", "103290984374794228198840215234635662808" ], "threshold": 0.9 }, "id": "CVE-2022-49542-fd815255", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc6501afccec55b8b6c90584cbf71f1fefa77d1e" } ] }