CVE-2022-49542

Source
https://cve.org/CVERecord?id=CVE-2022-49542
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49542.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49542
Downstream
Related
Published
2025-02-26T02:13:56.961Z
Modified
2026-03-11T05:46:42.231017Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
scsi: lpfc: Move cfg_log_verbose check before calling lpfc_dmp_dbg()
Details

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().

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49542.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0b3ad32e26460affc9d4b2f9c32d7c228e8b0cfb
Fixed
271725e4028559ae7974d762a8467dc9de412f2e
Fixed
cc6501afccec55b8b6c90584cbf71f1fefa77d1e
Fixed
09c772557a4fd9490fed1bfb133268313ea22213
Fixed
e294647b1aed4247fe52851f3a3b2b19ae906228

Affected versions

v5.*
v5.11
v5.11-rc3
v5.11-rc4
v5.11-rc5
v5.11-rc6
v5.11-rc7
v5.12
v5.12-rc1
v5.12-rc1-dontuse
v5.12-rc2
v5.12-rc3
v5.12-rc4
v5.12-rc5
v5.12-rc6
v5.12-rc7
v5.12-rc8
v5.13
v5.13-rc1
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.15.1
v5.15.10
v5.15.11
v5.15.12
v5.15.13
v5.15.14
v5.15.15
v5.15.16
v5.15.17
v5.15.18
v5.15.19
v5.15.2
v5.15.20
v5.15.21
v5.15.22
v5.15.23
v5.15.24
v5.15.25
v5.15.26
v5.15.27
v5.15.28
v5.15.29
v5.15.3
v5.15.30
v5.15.31
v5.15.32
v5.15.33
v5.15.34
v5.15.35
v5.15.36
v5.15.37
v5.15.38
v5.15.39
v5.15.4
v5.15.40
v5.15.41
v5.15.42
v5.15.43
v5.15.44
v5.15.45
v5.15.5
v5.15.6
v5.15.7
v5.15.8
v5.15.9
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.17.1
v5.17.10
v5.17.11
v5.17.12
v5.17.13
v5.17.2
v5.17.3
v5.17.4
v5.17.5
v5.17.6
v5.17.7
v5.17.8
v5.17.9
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.18.1
v5.18.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49542.json"
vanir_signatures
[
    {
        "id": "CVE-2022-49542-006b6f03",
        "signature_type": "Line",
        "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
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_init.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e294647b1aed4247fe52851f3a3b2b19ae906228",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-0faf47c9",
        "signature_type": "Line",
        "digest": {
            "line_hashes": [
                "62463167203912278503052872101195797982",
                "78524356138563809111531636623747529265",
                "301552106970123299321465129516880127790",
                "225620911814696839816101794268549466261",
                "155970578969905340290292235931234040240",
                "101553225643451846388718256472415097523",
                "327817999395227952476323069910811777452",
                "174208235211500537262892631192763328816",
                "337931604118256267093044641119615113500",
                "300985952100688095365872778546700959063",
                "113930489943357373664776619421839484241",
                "190125774280432728364235736098594982592"
            ],
            "threshold": 0.9
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_logmsg.h"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09c772557a4fd9490fed1bfb133268313ea22213",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-3a42041b",
        "signature_type": "Line",
        "digest": {
            "line_hashes": [
                "62463167203912278503052872101195797982",
                "78524356138563809111531636623747529265",
                "301552106970123299321465129516880127790",
                "225620911814696839816101794268549466261",
                "155970578969905340290292235931234040240",
                "101553225643451846388718256472415097523",
                "327817999395227952476323069910811777452",
                "174208235211500537262892631192763328816",
                "337931604118256267093044641119615113500",
                "300985952100688095365872778546700959063",
                "113930489943357373664776619421839484241",
                "190125774280432728364235736098594982592"
            ],
            "threshold": 0.9
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_logmsg.h"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc6501afccec55b8b6c90584cbf71f1fefa77d1e",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-45a2d3c4",
        "signature_type": "Line",
        "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
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_init.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@271725e4028559ae7974d762a8467dc9de412f2e",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-4d8def79",
        "signature_type": "Line",
        "digest": {
            "line_hashes": [
                "62463167203912278503052872101195797982",
                "78524356138563809111531636623747529265",
                "301552106970123299321465129516880127790",
                "225620911814696839816101794268549466261",
                "155970578969905340290292235931234040240",
                "101553225643451846388718256472415097523",
                "327817999395227952476323069910811777452",
                "174208235211500537262892631192763328816",
                "337931604118256267093044641119615113500",
                "300985952100688095365872778546700959063",
                "113930489943357373664776619421839484241",
                "190125774280432728364235736098594982592"
            ],
            "threshold": 0.9
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_logmsg.h"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@271725e4028559ae7974d762a8467dc9de412f2e",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-5e58ebb5",
        "signature_type": "Function",
        "digest": {
            "function_hash": "88588690604393993258938099477399581953",
            "length": 1645.0
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_init.c",
            "function": "lpfc_dmp_dbg"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09c772557a4fd9490fed1bfb133268313ea22213",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-8815a4a2",
        "signature_type": "Line",
        "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
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_init.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@09c772557a4fd9490fed1bfb133268313ea22213",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-b1818ed1",
        "signature_type": "Line",
        "digest": {
            "line_hashes": [
                "62463167203912278503052872101195797982",
                "78524356138563809111531636623747529265",
                "301552106970123299321465129516880127790",
                "225620911814696839816101794268549466261",
                "155970578969905340290292235931234040240",
                "101553225643451846388718256472415097523",
                "327817999395227952476323069910811777452",
                "174208235211500537262892631192763328816",
                "337931604118256267093044641119615113500",
                "300985952100688095365872778546700959063",
                "113930489943357373664776619421839484241",
                "190125774280432728364235736098594982592"
            ],
            "threshold": 0.9
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_logmsg.h"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e294647b1aed4247fe52851f3a3b2b19ae906228",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-c5bd87f4",
        "signature_type": "Function",
        "digest": {
            "function_hash": "88588690604393993258938099477399581953",
            "length": 1645.0
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_init.c",
            "function": "lpfc_dmp_dbg"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@271725e4028559ae7974d762a8467dc9de412f2e",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-cb33ab04",
        "signature_type": "Function",
        "digest": {
            "function_hash": "88588690604393993258938099477399581953",
            "length": 1645.0
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_init.c",
            "function": "lpfc_dmp_dbg"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc6501afccec55b8b6c90584cbf71f1fefa77d1e",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-cf9c67a1",
        "signature_type": "Function",
        "digest": {
            "function_hash": "88588690604393993258938099477399581953",
            "length": 1645.0
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_init.c",
            "function": "lpfc_dmp_dbg"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e294647b1aed4247fe52851f3a3b2b19ae906228",
        "signature_version": "v1",
        "deprecated": false
    },
    {
        "id": "CVE-2022-49542-fd815255",
        "signature_type": "Line",
        "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
        },
        "target": {
            "file": "drivers/scsi/lpfc/lpfc_init.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc6501afccec55b8b6c90584cbf71f1fefa77d1e",
        "signature_version": "v1",
        "deprecated": false
    }
]