CVE-2021-47541
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
24/05/2024
Last modified:
10/06/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net/mlx4_en: Fix an use-after-free bug in mlx4_en_try_alloc_resources()<br />
<br />
In mlx4_en_try_alloc_resources(), mlx4_en_copy_priv() is called and<br />
tmp->tx_cq will be freed on the error path of mlx4_en_copy_priv().<br />
After that mlx4_en_alloc_resources() is called and there is a dereference<br />
of &tmp->tx_cq[t][i] in mlx4_en_alloc_resources(), which could lead to<br />
a use after free problem on failure of mlx4_en_copy_priv().<br />
<br />
Fix this bug by adding a check of mlx4_en_copy_priv()<br />
<br />
This bug was found by a static analyzer. The analysis employs<br />
differential checking to identify inconsistent security operations<br />
(e.g., checks or kfrees) between two code paths and confirms that the<br />
inconsistent operations are not recovered in the current function or<br />
the callers, so they constitute bugs.<br />
<br />
Note that, as a bug found by static analysis, it can be a false<br />
positive or hard to trigger. Multiple researchers have cross-reviewed<br />
the bug.<br />
<br />
Builds with CONFIG_MLX4_EN=m show no new warnings,<br />
and our static analyzer no longer warns about this code.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.7 (including) | 4.14.257 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.15 (including) | 4.19.220 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.164 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.84 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.7 (excluding) |
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/676dc7d9b15bf8733233a2db1ec3f9091ab34275
- https://git.kernel.org/stable/c/75917372eef0dbfb290ae45474314d35f97aea18
- https://git.kernel.org/stable/c/addad7643142f500080417dd7272f49b7a185570
- https://git.kernel.org/stable/c/be12572c5ddc8ad7453bada4eec8fa46967dc757
- https://git.kernel.org/stable/c/e461a9816a1ac5b4aeb61621b817225b61e46a68
- https://git.kernel.org/stable/c/f1d43efa59f1edd3e7eca0e94559b4c6b1cd4e2b



