
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2021-47586 affects the Linux kernel and involves an out-of-bounds read vulnerability in the net: stmmac: dwmac-rk component. The vulnerability was discovered in the rk_gmac_setup function where KASAN reported an out-of-bounds read operation. The issue occurs when accessing the regs flexible array member that is empty for most platforms, causing the code to read memory beyond the ops structure boundaries (Kernel Commit).
The vulnerability stems from a code pattern in rk_gmac_setup where a while loop checks ops->regs[i] without proper bounds validation. Since the regs flexible array member is empty for most platforms, this results in reading memory after the ops structure. While this typically contains zero values (allowing the code to work by coincidence), it represents an unsafe memory access pattern. The fix involved adding a new regs_valid flag to indicate whether the regs field is valid and modifying the loop condition to check this flag before accessing the array (Kernel Commit).
The impact of this vulnerability is primarily related to information disclosure through out-of-bounds memory reads. While the bug typically reads memory that happens to contain zeros, it could potentially expose sensitive kernel memory contents under specific circumstances (Kernel Commit).
The vulnerability requires access to a system running the affected Linux kernel version with the stmmac driver. While the issue is consistently reproducible, the actual impact is mitigated by the fact that the out-of-bounds memory typically contains zero values (Kernel Commit).
The vulnerability was fixed by adding a regs_valid flag to the rk_gmac_ops structure and modifying the access pattern in rk_gmac_setup to check this flag before accessing the regs array. Users should update to a patched kernel version that includes the fix (Kernel Commit).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."