Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7346135d authored by David Stevens's avatar David Stevens Committed by David S. Miller
Browse files

vxlan: fix potential NULL dereference in arp_reduce()



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>
parent 0df04c4c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1318,6 +1318,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;