]> git.ipfire.org Git - people/ms/linux.git/commit
igbvf: integer wrapping bug setting the mtu
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Sep 2013 20:44:20 +0000 (20:44 +0000)
committerJiri Slaby <jslaby@suse.cz>
Tue, 26 Aug 2014 12:12:18 +0000 (14:12 +0200)
commit9b0b3e8944123d9888b71f84d844ec8ebcefc70d
tree2409680c72d375bf312a593a31b45d759b2754ed
parentae09150a6de6cdade01b451ed95abe8f041251fe
igbvf: integer wrapping bug setting the mtu

commit 3de9e65f011b95235a789b12abc4730570cdb737 upstream.

If new_mtu is very large then "new_mtu + ETH_HLEN + ETH_FCS_LEN" can
wrap and the check on the next line can underflow. This is one of those
bugs which can be triggered by the user if you have namespaces
configured.

Also since this is something the user can trigger then we don't want to
have dev_err() message.

This is a static checker fix and I'm not sure what the impact is.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Tested-by: Sibai Li Sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/intel/igbvf/netdev.c