This is a note to let you know that I've just added the patch titled

    [PATCH 24/28] ksz884x: don't copy too much in netdev_set_mac_address()

to the 3.3-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ksz884x-don-t-copy-too-much-in-netdev_set_mac_address.patch
and it can be found in the queue-3.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 9a369ce1662b82f8983dd977c9b3a9fa4232d0e1 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Thu, 19 Apr 2012 10:00:19 +0300
Subject: [PATCH 24/28] ksz884x: don't copy too much in netdev_set_mac_address()


From: Dan Carpenter <[email protected]>

[ 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/net/ethernet/micrel/ksz884x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -5675,7 +5675,7 @@ static int netdev_set_mac_address(struct
                memcpy(hw->override_addr, mac->sa_data, ETH_ALEN);
        }
 
-       memcpy(dev->dev_addr, mac->sa_data, MAX_ADDR_LEN);
+       memcpy(dev->dev_addr, mac->sa_data, ETH_ALEN);
 
        interrupt = hw_block_intr(hw);
 


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.3/ksz884x-don-t-copy-too-much-in-netdev_set_mac_address.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to