{"id":"CVE-2021-47586","aliases":["CVE-2021-47586"],"related":[],"kind":"vulnerability","state":"published","title":"net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: stmmac: dwmac-rk: fix oob read in rk_gmac_setup\n\nKASAN reports an out-of-bounds read in rk_gmac_setup on the line:\n\n\twhile (ops->regs[i]) {\n\nThis happens for most platforms since the regs flexible array member is\nempty, so the memory after the ops structure is being read here.  It\nseems that mostly this happens to contain zero anyway, so we get lucky\nand everything still works.\n\nTo avoid adding redundant data to nearly all the ops structures, add a\nnew flag to indicate whether the regs field is valid and avoid this loop\nwhen it is not.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: stmmac: dwmac-rk: fix oob read in rk_gmac_setup\n\nKASAN reports an out-of-bounds read in rk_gmac_setup on the line:\n\n\twhile (ops->regs[i]) {\n\nThis happens for most platforms since the regs flexible array member is\nempty, so the memory after the ops structure is being read here.  It\nseems that mostly this happens to contain zero anyway, so we get lucky\nand everything still works.\n\nTo avoid adding redundant data to nearly all the ops structures, add a\nnew flag to indicate whether the regs field is valid and avoid this loop\nwhen it is not.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup KASAN informa una lectura fuera de los límites en rk_gmac_setup en la línea: while (ops-&gt;regs[i]) { Esto sucede en la mayoría de las plataformas, ya que el miembro de la matriz flexible regs está vacío, por lo que aquí se lee la memoria después de la estructura de operaciones. Parece que la mayor parte de esto contiene cero de todos modos, así que tenemos suerte y todo sigue funcionando. Para evitar agregar datos redundantes a casi todas las estructuras de operaciones, agregue un nuevo indicador para indicar si el campo regs es válido y evite este bucle cuando no lo sea.","source":"nvd"}],"published":"2024-06-19T14:53:51.445Z","modified":"2026-06-17T04:17:49.120Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"git","introduced":"3bb3d6b1c1957e88bfc5e77a4557f7e6ba761fe3","fixed":"0b4a5d1e15ce72f69be48f38dc0401dab890ae0f","status":"affected"},{"type":"git","introduced":"3bb3d6b1c1957e88bfc5e77a4557f7e6ba761fe3","fixed":"0546b224cc7717cc8a2db076b0bb069a9c430794","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"5.15.11","lastAffected":"5.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.16","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.14","fixed":"5.15.11"},{"status":"affected","version":"5.16"},{"status":"affected","version":"5.16"},{"status":"affected","version":"5.16"},{"status":"affected","version":"5.16"},{"status":"affected","version":"5.16"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/0b4a5d1e15ce72f69be48f38dc0401dab890ae0f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0546b224cc7717cc8a2db076b0bb069a9c430794","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-20T15:19:59.553Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47586","url":"https://www.cve.org/CVERecord?id=CVE-2021-47586","licence":"CVE Terms of Use","modified":"2026-05-11T13:57:24.497Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47586","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47586","licence":"Public domain","modified":"2026-06-17T04:17:49.120Z"}],"updatedAt":"2026-11-25T22:58:08.928Z","epss":{"score":0.00267,"percentile":0.11755,"date":"2026-11-30T12:00:22.000Z"}}