Re: [PATCH] net: bmac: Fix read of MAC address from ROM
From: David Miller
Date: Tue May 19 2020 - 15:03:56 EST
From: Jeremy Kerr <jk@xxxxxxxxxx>
Date: Tue, 19 May 2020 09:05:58 +0800
> In bmac_get_station_address, We're reading two bytes at a time from ROM,
> but we do that six times, resulting in 12 bytes of read & writes. This
> means we will write off the end of the six-byte destination buffer.
>
> This change fixes the for-loop to only read/write six bytes.
>
> Based on a proposed fix from Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>.
>
> Signed-off-by: Jeremy Kerr <jk@xxxxxxxxxx>
> Reported-by: Stan Johnson <userm57@xxxxxxxxx>
> Tested-by: Stan Johnson <userm57@xxxxxxxxx>
> Reported-by: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
Applied, thanks.