Browse Source

[PATCH] aoe [1/8]: zero packet data after skb allocation

Zero the data in new socket buffers to prevent leaking information.

Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ed L. Cashin 19 years ago
parent
commit
50bba752ca
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/block/aoe/aoecmd.c

+ 1 - 0
drivers/block/aoe/aoecmd.c

@@ -28,6 +28,7 @@ new_skb(struct net_device *if_dev, ulong len)
 		skb->protocol = __constant_htons(ETH_P_AOE);
 		skb->protocol = __constant_htons(ETH_P_AOE);
 		skb->priority = 0;
 		skb->priority = 0;
 		skb_put(skb, len);
 		skb_put(skb, len);
+		memset(skb->head, 0, len);
 		skb->next = skb->prev = NULL;
 		skb->next = skb->prev = NULL;
 
 
 		/* tell the network layer not to perform IP checksums
 		/* tell the network layer not to perform IP checksums