]> 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:58:18 +0000 (18:58 +0200)
commitb370f7b1f470a8d5485cc1e40e8ff663bb55d712
tree4101c687c558a76c5556666e96d5ad9e7d470a4d
parent1f797f062b5cf13a1c2bcc23285361baaa7c9260
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