CVE-2022-49606: RDMA/irdma: Fix sleep from invalid context BUG
In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: Fix sleep from invalid context BUG
Taking the qosmutex to process RoCEv2 QP's on netdev events causes a kernel splat.
Fix this by removing the handling for RoCEv2 in irdmacmteardownconnections 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: dumpstack+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: ? irdmaexeccqpcmd+0xc27/0x17c0 [irdma] kernel: ? wakeupcommon+0x7a/0x190 kernel: irdmaifnotify+0x3cc/0x450 [irdma] kernel: ? schedclockcpu+0xc/0xb0 kernel: irdmainet6addrevent+0xc6/0x150 [irdma]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1021.25~20.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1021.26~20.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1021.28~20.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-50.56~20.04.1 - Upgrade
Upgrade
ubuntu/linux-intel-iotg-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1017.22~20.04.1 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-50.56~20.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1019.24~20.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1022.26~20.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 5.15.0-50.56 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 5.15.0-1021.25 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 5.15.0-1021.26 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 5.15.0-1024.30.1 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 5.15.0-1019.25 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 5.15.0-1017.20 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 5.15.0-1004.6 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 5.15.0-1015.17 - Upgrade
Upgrade
ubuntu/linux-intel-iotgto a version that resolves this vulnerability.Fixed in 5.15.0-1017.22 - Upgrade
Upgrade
ubuntu/linux-kvmto a version that resolves this vulnerability.Fixed in 5.15.0-1019.23 - Upgrade
Upgrade
ubuntu/linux-lowlatencyto a version that resolves this vulnerability.Fixed in 5.15.0-50.56 - Upgrade
Upgrade
ubuntu/linux-nvidiato a version that resolves this vulnerability.Fixed in 5.15.0-1015.15 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 5.15.0-1019.24 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 5.15.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 5.15.0-1022.22 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.18.16-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1 - Configuration
Remove the RoCEv2 handling that takes qos_mutex from irdma_cm_teardown_connections; this handling is only needed for iWARP.
Linux kernel RDMA/irdma RoCEv2 handling in irdma_cm_teardown_connections = removed
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49606?
CVE-2022-49606 has a moderate severity as it can lead to kernel crashes under certain circumstances.
How do I fix CVE-2022-49606?
Fix CVE-2022-49606 by updating the Linux kernel to a version that includes the patch for this vulnerability.
What versions of the Linux kernel are affected by CVE-2022-49606?
CVE-2022-49606 affects Linux kernel versions between 5.14 and 5.15.58, and between 5.16 and 5.18.15, including specific release candidates of 5.19.
What components are involved in CVE-2022-49606?
CVE-2022-49606 involves the RDMA/irdma component in the Linux kernel, particularly related to RoCEv2 QP's.
Is there a workaround for CVE-2022-49606 until I can apply a patch?
There are no effective workarounds documented for CVE-2022-49606; applying the patch is recommended.