summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Stevens <dlstevens@us.ibm.com>2014-03-18 12:32:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-14 06:42:17 -0700
commitc3c4a8c1e19205057f680ab3d73044462bd5303c (patch)
tree8b389cb15e06ab099dcbea3e3bf410d75daec9e6
parent8e5612a299431024c3b8c136ba4cb7c523dec934 (diff)
downloadlwn-c3c4a8c1e19205057f680ab3d73044462bd5303c.tar.gz
lwn-c3c4a8c1e19205057f680ab3d73044462bd5303c.zip
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 <dlstevens@us.ibm.com> Acked-by: Cong Wang <cwang@twopensource.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/vxlan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 054489fdf54a..9673edfff451 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -845,6 +845,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;