Discussion:
[PATCH v2] vxlan: fix a free after use
r***@gmail.com
2014-10-17 06:06:16 UTC
Permalink
From: Li RongQing <***@gmail.com>

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 <***@google.com>
Signed-off-by: Li RongQing <***@gmail.com>
---
drivers/net/vxlan.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 855a81d..fabd514 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1885,6 +1885,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.7.10.4
David Miller
2014-10-17 20:24:17 UTC
Permalink
From: ***@gmail.com
Date: Fri, 17 Oct 2014 14:06:16 +0800
Post by r***@gmail.com
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")
Applied, thanks.

Loading...