[PATCH 3.13 32/65] vxlan: fix potential NULL dereference in arp_reduce()

From: Greg Kroah-Hartman
Date: Fri Apr 11 2014 - 12:47:14 EST


3.13-stable review patch. If anyone has any objections, please let me know.

------------------

From: David Stevens <dlstevens@xxxxxxxxxx>

[ 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@xxxxxxxxxx>
Acked-by: Cong Wang <cwang@xxxxxxxxxxxxxxxx>

Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/net/vxlan.c | 3 +++
1 file changed, 3 insertions(+)

--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1208,6 +1208,9 @@ static int arp_reduce(struct net_device

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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/