CVE-2021-47012: RDMA/siw: Fix a use after free in siw_alloc_mr

Published Feb 28, 2024
·
Updated

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

RDMA/siw: Fix a use after free in siwallocmr

Our code analyzer reported a UAF.

In siwallocmr(), it calls siwmraddmem(mr,..). In the implementation of siwmraddmem(), mem is assigned to mr->mem and then mem is freed via kfree(mem) if xaalloccyclic() failed. Here, mr->mem still point to a freed object. After, the execution continue up to the errout branch of siwallocmr, and the freed mr->mem is used in siwmrdropmem(mr).

My patch moves "mr->mem = mem" behind the if (xaalloccyclic(..)<0) {} section, to avoid the uaf.

Affected Software

4 affected components
Linux Linux kernel>=5.3<5.4.119
Linux Linux kernel>=5.5<5.10.37
Linux Linux kernel>=5.11<5.11.21
Linux Linux kernel>=5.12<5.12.4

Event History

Feb 28, 2024
CVE Published
via MITRE·08:13 AM
Data Sourced
via MITRE·08:13 AM
DescriptionSeverity
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-47012?

CVE-2021-47012 has been classified with a moderate severity due to a use-after-free vulnerability in the Linux kernel.

2

How do I fix CVE-2021-47012?

To fix CVE-2021-47012, upgrade your Linux kernel to a version that includes the patch addressing this vulnerability.

3

Which versions of the Linux kernel are affected by CVE-2021-47012?

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.

4

What impact does CVE-2021-47012 have on system security?

Exploiting CVE-2021-47012 could potentially allow an attacker to execute arbitrary code or crash the system.

5

Is CVE-2021-47012 a remote code execution vulnerability?

CVE-2021-47012 is not specifically classified as a remote code execution vulnerability, but it does pose risks related to memory management.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203