On 17/08/2025 12:25, Vitaly Lifshits wrote:
Fix a possible heap overflow in e1000_set_eeprom function by adding input validation for the requested length of the change in the EEPROM. In addition, change the variable type from int to size_t for better code practices and rearrange declarations to RCT.Fixes: bc7f75fa9788 ("[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)") Co-developed-by: Mikael Wessel <[email protected]> Signed-off-by: Mikael Wessel <[email protected]> Signed-off-by: Vitaly Lifshits <[email protected]> --- v3: Change error code to EFBIG v3: Change max_len and total_len to size_t v2: Use check_add_overflow for boundary checking --- drivers/net/ethernet/intel/e1000e/ethtool.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Tested-by: Mor Bar-Gabay <[email protected]>
