[PATCH 3.14 005/203] vxlan: fix a free after use

From: Greg Kroah-Hartman
Date: Tue Nov 11 2014 - 22:11:55 EST


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

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

From: Li RongQing <roy.qing.li@xxxxxxxxx>

[ 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@xxxxxxxxxx>
Signed-off-by: Li RongQing <roy.qing.li@xxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/net/vxlan.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1986,6 +1986,7 @@ static netdev_tx_t vxlan_xmit(struct sk_
msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION)
return neigh_reduce(dev, skb);
}
+ eth = eth_hdr(skb);
#endif
}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/