Out-of-bounds Read in Linux

CVE-2021-47586

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

Vulnerability class: Buffer Overflow

EPSS: 0.002 (11.1th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2021-47586?
CVE-2021-47586 is a medium-severity vulnerability in Linux, classified under Out-of-bounds Read. CVSS score: 5.5/10. Published 2024-06-19.
How severe is CVE-2021-47586?
Medium severity. CVSS v3 base score is 5.5 out of 10.