[PATCH 3.13.y-ckt 06/96] vxlan: fix a free after use

Kamal Mostafa kamal at canonical.com
Mon Dec 15 19:25:26 UTC 2014


3.13.11-ckt13 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Li RongQing <roy.qing.li at gmail.com>

[ Upstream commit 7a9f526fc3ee49b6034af2f243676ee0a27dcaa8 ]

pskb_may_pull maybe change skb->data and make eth pointer oboslete,
so eth needs to reload

Fixes: 91269e390d062 ("vxlan: using pskb_may_pull as early as possible")
Cc: Eric Dumazet <edumazet at google.com>
Signed-off-by: Li RongQing <roy.qing.li at gmail.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/net/vxlan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 0969176..1812b79 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1893,6 +1893,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
 				    msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION)
 					return neigh_reduce(dev, skb);
 		}
+		eth = eth_hdr(skb);
 #endif
 	}
 
-- 
1.9.1





More information about the kernel-team mailing list