Re: [PATCH] net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
From: David Miller
Date: Fri Apr 03 2020 - 18:59:53 EST
From: Jisheng Zhang <jszhang3@xxxxxxxxxxxxxxxx>
Date: Fri, 3 Apr 2020 10:23:29 +0800
> From: Jisheng Zhang <Jisheng.Zhang@xxxxxxxxxxxxx>
>
> Commit 9463c4455900 ("net: stmmac: dwmac1000: Clear unused address
> entries") cleared the unused mac address entries, but introduced an
> out-of bounds mac address register programming bug -- After setting
> the secondary unicast mac addresses, the "reg" value has reached
> netdev_uc_count() + 1, thus we should only clear address entries
> if (addr < perfect_addr_number)
>
> Fixes: 9463c4455900 ("net: stmmac: dwmac1000: Clear unused address entries")
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@xxxxxxxxxxxxx>
Applied and queued up for -stable, thanks.