Re: [PATCH net v3] ice: copy last block omitted in ice_get_module_eeprom()

From: Jesse Brandeburg
Date: Wed Mar 01 2023 - 17:27:24 EST


On 3/1/2023 12:47 PM, Petr Oros wrote:
> ice_get_module_eeprom() is broken since commit e9c9692c8a81 ("ice:
> Reimplement module reads used by ethtool") In this refactor,
> ice_get_module_eeprom() reads the eeprom in blocks of size 8.
> But the condition that should protect the buffer overflow
> ignores the last block. The last block always contains zeros.

...

>
> Fixes: e9c9692c8a81 ("ice: Reimplement module reads used by ethtool")
> Signed-off-by: Petr Oros <poros@xxxxxxxxxx>

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@xxxxxxxxx>
Tested-by: Jesse Brandeburg <jesse.brandeburg@xxxxxxxxx>

Thanks Petr!