CVE-2022-49606

Source
https://cve.org/CVERecord?id=CVE-2022-49606
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49606.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49606
Downstream
Related
Published
2025-02-26T02:23:31.346Z
Modified
2026-03-11T06:07:14.257079Z
Summary
RDMA/irdma: Fix sleep from invalid context BUG
Details

In the Linux kernel, the following vulnerability has been resolved:

RDMA/irdma: Fix sleep from invalid context BUG

Taking the qos_mutex to process RoCEv2 QP's on netdev events causes a kernel splat.

Fix this by removing the handling for RoCEv2 in irdmacmteardown_connections that uses the mutex. This handling is only needed for iWARP to avoid having connections established while the link is down or having connections remain functional after the IP address is removed.

BUG: sleeping function called from invalid context at kernel/locking/mutex. Call Trace: kernel: dump_stack+0x66/0x90 kernel: ___mightsleep.cold.92+0x8d/0x9a kernel: mutexlock+0x1c/0x40 kernel: irdmacmteardownconnections+0x28e/0x4d0 [irdma] kernel: ? checkpreemptcurr+0x7a/0x90 kernel: ? selectidlesibling+0x22/0x3c0 kernel: ? selecttaskrqfair+0x94c/0xc90 kernel: ? irdmaexeccqp_cmd+0xc27/0x17c0 [irdma] kernel: ? __wakeupcommon+0x7a/0x190 kernel: irdmaifnotify+0x3cc/0x450 [irdma] kernel: ? schedclockcpu+0xc/0xb0 kernel: irdmainet6addrevent+0xc6/0x150 [irdma]

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49606.json"
}
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
146b9756f14c04894226fb97e2f102f217139c27
Fixed
a4c5115140ed1833197bad9a6b80265840ff427f
Fixed
2cae7e519032e4b4672cb9204d5586a441924364
Fixed
cc0315564d6eec91c716d314b743321be24c70b3

Affected versions

v5.*
v5.13
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.46
v5.15.47
v5.15.48
v5.15.49
v5.15.5
v5.15.50
v5.15.51
v5.15.52
v5.15.53
v5.15.54
v5.15.55
v5.15.56
v5.15.57
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.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.10
v5.18.11
v5.18.12
v5.18.13
v5.18.14
v5.18.2
v5.18.3
v5.18.4
v5.18.5
v5.18.6
v5.18.7
v5.18.8
v5.18.9
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49606.json"
vanir_signatures
[
    {
        "signature_version": "v1",
        "target": {
            "file": "drivers/infiniband/hw/irdma/cm.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a4c5115140ed1833197bad9a6b80265840ff427f",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "110664991026309364244051224846702537288",
                "260139769559923813400988180826231893877",
                "247779447451869198138959764421693024927",
                "277998415367979254825531341055444103866",
                "64951744174915985933285361196730899253",
                "62296903826577577700977445184013808453",
                "97122339666100515080361826497476585550",
                "182485382795554884051067737561333577942",
                "166324408623976712657846699026380198778",
                "42641532797699442704478009950438226386",
                "258507379971491928877546201981996231524",
                "267860914657954937984617634826660267232",
                "86347011719508432796993266642591085011",
                "8350629004984711277993715450452467929",
                "221979905320050271175853888700174505762",
                "133495999364869241543354188886301739620",
                "258852382287222833026078336290331727366",
                "254177046467892133761835321063344672468",
                "46108399072928912991401934760476029360",
                "148531238553259065984275031443945630110",
                "30362626509425003666690769193749391811",
                "221563883610402206724425939799221663175",
                "31478099759382088384135502926916322156",
                "269481833706358742324616122531637527649",
                "232401931238180387125800338381515409341",
                "302178032193617722979255151172289182181",
                "229888209069633839043737677016397827949",
                "74223449361387392473496798112771109622",
                "272492784988839826259597090856603460339",
                "246545539946327271966451625797785274886",
                "247547253370994870235915966968132352622",
                "105806145208592638546658012971865301569",
                "10360980824383604582126371628977246304",
                "95745870176499242107181013586144387350",
                "309251562245204107536592663512169283554",
                "268844946224881120829727805799073156444",
                "250536403939294809026637971386576113597",
                "164613601363835538715342153973493719745",
                "202485237148298037819390758703349055725",
                "200731819504165786059754539949322088834",
                "110729037601439766782712350964662861205",
                "133535284289861132858929342463131446369",
                "106377777342650680235159826520784772557",
                "97463339025312302514440078104749009410",
                "151148733569953245879210825732048892335",
                "317008824754967768022546870525599560883",
                "25887507243926208490579002576741709329",
                "179281816991821533001841065421834694511",
                "137609607562259930996909330041482904220",
                "308867504644005980678666093768407130117",
                "85713597151317428994225085978318109533"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2022-49606-0e602a63",
        "signature_type": "Line"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "drivers/infiniband/hw/irdma/cm.c",
            "function": "irdma_cm_teardown_connections"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc0315564d6eec91c716d314b743321be24c70b3",
        "deprecated": false,
        "digest": {
            "function_hash": "170073842597801790020281087624114875830",
            "length": 1825.0
        },
        "id": "CVE-2022-49606-2dbb4bca",
        "signature_type": "Function"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "drivers/infiniband/hw/irdma/cm.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc0315564d6eec91c716d314b743321be24c70b3",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "110664991026309364244051224846702537288",
                "260139769559923813400988180826231893877",
                "247779447451869198138959764421693024927",
                "277998415367979254825531341055444103866",
                "64951744174915985933285361196730899253",
                "62296903826577577700977445184013808453",
                "97122339666100515080361826497476585550",
                "182485382795554884051067737561333577942",
                "166324408623976712657846699026380198778",
                "42641532797699442704478009950438226386",
                "258507379971491928877546201981996231524",
                "267860914657954937984617634826660267232",
                "86347011719508432796993266642591085011",
                "8350629004984711277993715450452467929",
                "221979905320050271175853888700174505762",
                "133495999364869241543354188886301739620",
                "258852382287222833026078336290331727366",
                "254177046467892133761835321063344672468",
                "46108399072928912991401934760476029360",
                "148531238553259065984275031443945630110",
                "30362626509425003666690769193749391811",
                "221563883610402206724425939799221663175",
                "31478099759382088384135502926916322156",
                "269481833706358742324616122531637527649",
                "232401931238180387125800338381515409341",
                "302178032193617722979255151172289182181",
                "229888209069633839043737677016397827949",
                "74223449361387392473496798112771109622",
                "272492784988839826259597090856603460339",
                "246545539946327271966451625797785274886",
                "247547253370994870235915966968132352622",
                "105806145208592638546658012971865301569",
                "10360980824383604582126371628977246304",
                "95745870176499242107181013586144387350",
                "309251562245204107536592663512169283554",
                "268844946224881120829727805799073156444",
                "250536403939294809026637971386576113597",
                "164613601363835538715342153973493719745",
                "202485237148298037819390758703349055725",
                "200731819504165786059754539949322088834",
                "110729037601439766782712350964662861205",
                "133535284289861132858929342463131446369",
                "106377777342650680235159826520784772557",
                "97463339025312302514440078104749009410",
                "151148733569953245879210825732048892335",
                "317008824754967768022546870525599560883",
                "25887507243926208490579002576741709329",
                "179281816991821533001841065421834694511",
                "137609607562259930996909330041482904220",
                "308867504644005980678666093768407130117",
                "85713597151317428994225085978318109533"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2022-49606-3c8dd0cc",
        "signature_type": "Line"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "drivers/infiniband/hw/irdma/cm.c",
            "function": "irdma_cm_teardown_connections"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2cae7e519032e4b4672cb9204d5586a441924364",
        "deprecated": false,
        "digest": {
            "function_hash": "170073842597801790020281087624114875830",
            "length": 1825.0
        },
        "id": "CVE-2022-49606-68def0bf",
        "signature_type": "Function"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "drivers/infiniband/hw/irdma/cm.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2cae7e519032e4b4672cb9204d5586a441924364",
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "110664991026309364244051224846702537288",
                "260139769559923813400988180826231893877",
                "247779447451869198138959764421693024927",
                "277998415367979254825531341055444103866",
                "64951744174915985933285361196730899253",
                "62296903826577577700977445184013808453",
                "97122339666100515080361826497476585550",
                "182485382795554884051067737561333577942",
                "166324408623976712657846699026380198778",
                "42641532797699442704478009950438226386",
                "258507379971491928877546201981996231524",
                "267860914657954937984617634826660267232",
                "86347011719508432796993266642591085011",
                "8350629004984711277993715450452467929",
                "221979905320050271175853888700174505762",
                "133495999364869241543354188886301739620",
                "258852382287222833026078336290331727366",
                "254177046467892133761835321063344672468",
                "46108399072928912991401934760476029360",
                "148531238553259065984275031443945630110",
                "30362626509425003666690769193749391811",
                "221563883610402206724425939799221663175",
                "31478099759382088384135502926916322156",
                "269481833706358742324616122531637527649",
                "232401931238180387125800338381515409341",
                "302178032193617722979255151172289182181",
                "229888209069633839043737677016397827949",
                "74223449361387392473496798112771109622",
                "272492784988839826259597090856603460339",
                "246545539946327271966451625797785274886",
                "247547253370994870235915966968132352622",
                "105806145208592638546658012971865301569",
                "10360980824383604582126371628977246304",
                "95745870176499242107181013586144387350",
                "309251562245204107536592663512169283554",
                "268844946224881120829727805799073156444",
                "250536403939294809026637971386576113597",
                "164613601363835538715342153973493719745",
                "202485237148298037819390758703349055725",
                "200731819504165786059754539949322088834",
                "110729037601439766782712350964662861205",
                "133535284289861132858929342463131446369",
                "106377777342650680235159826520784772557",
                "97463339025312302514440078104749009410",
                "151148733569953245879210825732048892335",
                "317008824754967768022546870525599560883",
                "25887507243926208490579002576741709329",
                "179281816991821533001841065421834694511",
                "137609607562259930996909330041482904220",
                "308867504644005980678666093768407130117",
                "85713597151317428994225085978318109533"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2022-49606-9f2d050e",
        "signature_type": "Line"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "drivers/infiniband/hw/irdma/cm.c",
            "function": "irdma_cm_teardown_connections"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a4c5115140ed1833197bad9a6b80265840ff427f",
        "deprecated": false,
        "digest": {
            "function_hash": "170073842597801790020281087624114875830",
            "length": 1825.0
        },
        "id": "CVE-2022-49606-a0afbc3d",
        "signature_type": "Function"
    }
]