CVE-2022-50129: RDMA/srpt: Fix a use-after-free
In the Linux kernel, the following vulnerability has been resolved:
RDMA/srpt: Fix a use-after-free
Change the LIO port members inside struct srptport from regular members into pointers. Allocate the LIO port data structures from inside srptmaketport() and free these from inside srptmaketport(). Keep struct srptdevice as long as either an RDMA port or a LIO target port is associated with it. This patch decouples the lifetime of struct srptport (controlled by the RDMA core) and struct srptportid (controlled by LIO). This patch fixes the following KASAN complaint:
BUG: KASAN: use-after-free in srptenabletpg+0x31/0x70 [ibsrpt] Read of size 8 at addr ffff888141cc34b8 by task check/5093
Call Trace: <TASK> showstack+0x4e/0x53 dumpstacklvl+0x51/0x66 printaddressdescription.constprop.0.cold+0xea/0x41e printreport.cold+0x90/0x205 kasanreport+0xb9/0xf0 asanload8+0x69/0x90 srptenabletpg+0x31/0x70 [ibsrpt] targetfabrictpgbaseenablestore+0xe2/0x140 [targetcoremod] configfswriteiter+0x18b/0x210 newsyncwrite+0x1f2/0x2f0 vfswrite+0x3e3/0x540 ksyswrite+0xbb/0x140 x64syswrite+0x42/0x50 dosyscall64+0x34/0x80 entrySYSCALL64afterhwframe+0x46/0xb0 </TASK>
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-1023.27~20.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1023.29~20.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1022.29~20.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-53.59~20.04.1 - Upgrade
Upgrade
ubuntu/linux-intel-iotg-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1018.23~20.04.1 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-53.59~20.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1022.28~20.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1023.27~20.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 5.15.0-53.59 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 5.15.0-1023.27 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 5.15.0-1023.29 - 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-1022.29 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 5.15.0-1020.25 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 5.15.0-1008.12 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 5.15.0-1018.21 - Upgrade
Upgrade
ubuntu/linux-intel-iotgto a version that resolves this vulnerability.Fixed in 5.15.0-1018.23 - Upgrade
Upgrade
ubuntu/linux-kvmto a version that resolves this vulnerability.Fixed in 5.15.0-1021.26 - Upgrade
Upgrade
ubuntu/linux-lowlatencyto a version that resolves this vulnerability.Fixed in 5.15.0-53.59 - 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-1022.28 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 5.15.0-1018.20 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 5.15.0-1025.28 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.0.2-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.140-1Fixed in 6.0.2-1
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50129?
CVE-2022-50129 is classified as a high-severity vulnerability in the Linux kernel.
How do I fix CVE-2022-50129?
To fix CVE-2022-50129, upgrade your Linux kernel to a version that is not affected by this vulnerability.
What types of systems are affected by CVE-2022-50129?
CVE-2022-50129 affects various versions of the Linux kernel ranging from 3.3 to 5.19.2.
What is the nature of the vulnerability in CVE-2022-50129?
CVE-2022-50129 is a use-after-free vulnerability related to RDMA/srpt in the Linux kernel.
Is there a known exploit for CVE-2022-50129?
As of now, there are no public exploits reported for CVE-2022-50129.