CVE-2021-47586
MEDIUM 5.5CVSS 3.1In 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.
- Published
- 19 Jun 2024
- Last modified
- 17 Jun 2026
- Assigned by
- 416baaa9-dc9f-4396-8d5f-8c081fb06d67
- NVD status
- Analyzed
- Weakness
- CWE-125
- Sources
- NVDJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | linux | linux_kernelcpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
>= 5.14, < 5.15.11 | 5.15.11 |
| NVD | linux | linux_kernelcpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:* |
= 5.16 | |
| NVD | linux | linux_kernelcpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:* |
= 5.16 | |
| NVD | linux | linux_kernelcpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:* |
= 5.16 | |
| NVD | linux | linux_kernelcpe:2.3:o:linux:linux_kernel:5.16:rc4:*:*:*:*:*:* |
= 5.16 | |
| NVD | linux | linux_kernelcpe:2.3:o:linux:linux_kernel:5.16:rc5:*:*:*:*:*:* |
= 5.16 |
References
- https://git.kernel.org/stable/c/0546b224cc7717cc8a2db076b0bb069a9c430794 · Patch
- https://git.kernel.org/stable/c/0b4a5d1e15ce72f69be48f38dc0401dab890ae0f · Patch
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 19 Jun 2024)