]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
e1000e: fix heap overflow in e1000_set_eeprom
authorVitaly Lifshits <vitaly.lifshits@intel.com>
Sun, 17 Aug 2025 09:25:47 +0000 (12:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:56:28 +0000 (18:56 +0200)
commit50a84d5c814039ad2abe2748aec3e89324a548a7
tree236bef54e28708b56816c084579ffc22aa1e1b96
parent1cfa5dd05847137f0fb3ce74ced80c0b4858d716
e1000e: fix heap overflow in e1000_set_eeprom

commit 90fb7db49c6dbac961c6b8ebfd741141ffbc8545 upstream.

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.

Cc: stable@vger.kernel.org
Fixes: bc7f75fa9788 ("[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)")
Co-developed-by: Mikael Wessel <post@mikaelkw.online>
Signed-off-by: Mikael Wessel <post@mikaelkw.online>
Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/e1000e/ethtool.c