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-&gt;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 &amp;tmp-&gt;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.

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)