Commit c3c4a8c1 authored by David Stevens's avatar David Stevens Committed by Greg Kroah-Hartman

vxlan: fix potential NULL dereference in arp_reduce()

[ Upstream commit 7346135d ]

This patch fixes a NULL pointer dereference in the event of an
skb allocation failure in arp_reduce().
Signed-Off-By: default avatarDavid L Stevens <dlstevens@us.ibm.com>
Acked-by: default avatarCong Wang <cwang@twopensource.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8e5612a2
...@@ -845,6 +845,9 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb) ...@@ -845,6 +845,9 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb)
neigh_release(n); neigh_release(n);
if (reply == NULL)
goto out;
skb_reset_mac_header(reply); skb_reset_mac_header(reply);
__skb_pull(reply, skb_network_offset(reply)); __skb_pull(reply, skb_network_offset(reply));
reply->ip_summed = CHECKSUM_UNNECESSARY; reply->ip_summed = CHECKSUM_UNNECESSARY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment