]> git.baikalelectronics.ru Git - kernel.git/commit
qlcnic: Fix memory corruption while reading stats using ethtool.
authorManish Chopra <manish.chopra@qlogic.com>
Mon, 22 Sep 2014 09:51:51 +0000 (05:51 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Sep 2014 19:11:31 +0000 (15:11 -0400)
commit65f5a2e0c625b74d4936614d08a1d38cb4fe87b6
treef5c7c78025b56bbb86eec486507c18746e8b1389
parent883a260aa6e772f17a93081b63db8b4b2af68218
qlcnic: Fix memory corruption while reading stats using ethtool.

o  Driver is doing memset with zero for total number of stats bytes when
   it has already filled some data in the stats buffer, which can overwrite
   memory area beyond the length of stats buffer.

o  Fix this by initializing stats buffer with zero before filling any data in it.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c