From: David Stevens Date: Tue, 18 Mar 2014 16:32:29 +0000 (-0400) Subject: vxlan: fix potential NULL dereference in arp_reduce() X-Git-Tag: v3.13.10~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1ef50212d122b0e775fb234b4c1523d52859acb;p=thirdparty%2Fkernel%2Fstable.git vxlan: fix potential NULL dereference in arp_reduce() [ Upstream commit 7346135dcd3f9b57f30a5512094848c678d7143e ] This patch fixes a NULL pointer dereference in the event of an skb allocation failure in arp_reduce(). Signed-Off-By: David L Stevens Acked-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 02479739eaa0d..e15b255ecaf1d 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1208,6 +1208,9 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb) neigh_release(n); + if (reply == NULL) + goto out; + skb_reset_mac_header(reply); __skb_pull(reply, skb_network_offset(reply)); reply->ip_summed = CHECKSUM_UNNECESSARY;