CVE-2021-47523
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
24/05/2024
Last modified:
24/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
IB/hfi1: Fix leak of rcvhdrtail_dummy_kvaddr<br />
<br />
This buffer is currently allocated in hfi1_init():<br />
<br />
if (reinit)<br />
ret = init_after_reset(dd);<br />
else<br />
ret = loadtime_init(dd);<br />
if (ret)<br />
goto done;<br />
<br />
/* allocate dummy tail memory for all receive contexts */<br />
dd->rcvhdrtail_dummy_kvaddr = dma_alloc_coherent(&dd->pcidev->dev,<br />
sizeof(u64),<br />
&dd->rcvhdrtail_dummy_dma,<br />
GFP_KERNEL);<br />
<br />
if (!dd->rcvhdrtail_dummy_kvaddr) {<br />
dd_dev_err(dd, "cannot allocate dummy tail memory\n");<br />
ret = -ENOMEM;<br />
goto done;<br />
}<br />
<br />
The reinit triggered path will overwrite the old allocation and leak it.<br />
<br />
Fix by moving the allocation to hfi1_alloc_devdata() and the deallocation<br />
to hfi1_free_devdata().
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.5 (including) | 5.10.85 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.8 (excluding) |
| cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.16:rc4:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/2c08271f4ed0e24633b3f81ceff61052b9d45efc
- https://git.kernel.org/stable/c/60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1
- https://git.kernel.org/stable/c/834d0fb978643eaf09da425de197cc16a7c2761b
- https://git.kernel.org/stable/c/2c08271f4ed0e24633b3f81ceff61052b9d45efc
- https://git.kernel.org/stable/c/60a8b5a1611b4a26de4839ab9c1fc2a9cf3e17c1
- https://git.kernel.org/stable/c/834d0fb978643eaf09da425de197cc16a7c2761b



