Re: [PATCH] net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup

From: patchwork-bot+netdevbpf
Date: Thu Dec 16 2021 - 15:51:52 EST


Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@xxxxxxxxxxxxx>:

On Tue, 14 Dec 2021 19:10:09 +0000 you wrote:
> 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.
>
> [...]

Here is the summary with links:
- net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup
https://git.kernel.org/netdev/net/c/0546b224cc77

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html