]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ksz884x: don't copy too much in netdev_set_mac_address()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 19 Apr 2012 07:00:19 +0000 (10:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 17:17:05 +0000 (10:17 -0700)
commit9d0566204ed97b07856dbe9ad1cea97d255132cb
treed780e15a7e5e0645ca49f1df39828496953e4e5a
parente6f8c8491515dcaa8686d7e6b805edd4aba281d8
ksz884x: don't copy too much in netdev_set_mac_address()

[ Upstream commit 716af4abd6e6370226f567af50bfaca274515980 ]

MAX_ADDR_LEN is 32.  ETH_ALEN is 6.  mac->sa_data is a 14 byte array, so
the memcpy() is doing a read past the end of the array.  I asked about
this on netdev and Ben Hutchings told me it's supposed to be copying
ETH_ALEN bytes (thanks Ben).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/micrel/ksz884x.c