CVE-2021-47586

Severity CVSS v4.0:
Pending analysis
Type:
CWE-125 Out-of-bounds Read
Publication date:
19/06/2024
Last modified:
01/04/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup<br /> <br /> KASAN reports an out-of-bounds read in rk_gmac_setup on the line:<br /> <br /> while (ops-&gt;regs[i]) {<br /> <br /> This happens for most platforms since the regs flexible array member is<br /> empty, so the memory after the ops structure is being read here. It<br /> seems that mostly this happens to contain zero anyway, so we get lucky<br /> and everything still works.<br /> <br /> To avoid adding redundant data to nearly all the ops structures, add a<br /> new flag to indicate whether the regs field is valid and avoid this loop<br /> when it is not.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.14 (including) 5.15.11 (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:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.16:rc5:*:*:*:*:*:*