First published: Wed Feb 28 2024(Updated: )
In the Linux kernel, the following vulnerability has been resolved: RDMA/siw: Fix a use after free in siw_alloc_mr Our code analyzer reported a UAF. In siw_alloc_mr(), it calls siw_mr_add_mem(mr,..). In the implementation of siw_mr_add_mem(), mem is assigned to mr->mem and then mem is freed via kfree(mem) if xa_alloc_cyclic() failed. Here, mr->mem still point to a freed object. After, the execution continue up to the err_out branch of siw_alloc_mr, and the freed mr->mem is used in siw_mr_drop_mem(mr). My patch moves "mr->mem = mem" behind the if (xa_alloc_cyclic(..)<0) {} section, to avoid the uaf.
Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Software | Affected Version | How to fix |
---|---|---|
Linux Kernel | >=5.3<5.4.119 | |
Linux Kernel | >=5.5<5.10.37 | |
Linux Kernel | >=5.11<5.11.21 | |
Linux Kernel | >=5.12<5.12.4 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2021-47012 has been classified with a moderate severity due to a use-after-free vulnerability in the Linux kernel.
To fix CVE-2021-47012, upgrade your Linux kernel to a version that includes the patch addressing this vulnerability.
CVE-2021-47012 affects Linux kernel versions between 5.3 and 5.4.119, 5.5 and 5.10.37, 5.11 and 5.11.21, and 5.12 and 5.12.4.
Exploiting CVE-2021-47012 could potentially allow an attacker to execute arbitrary code or crash the system.
CVE-2021-47012 is not specifically classified as a remote code execution vulnerability, but it does pose risks related to memory management.