Message ID | 201403181632.s2IGWTjT003613@lab1.dls |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, Mar 18, 2014 at 9:32 AM, David L Stevens <dlstevens@us.ibm.com> wrote: > > 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> > > diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c > index eb59b14..570792c 100644 > --- a/drivers/net/vxlan.c > +++ b/drivers/net/vxlan.c > @@ -1315,6 +1315,9 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb) > > neigh_release(n); > > + if (reply == NULL) > + goto out; > + Nit: move it right after arp_create(). Otherwise: Acked-by: Cong Wang <cwang@twopensource.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>From: Cong Wang > >Nit: move it right after arp_create(). Otherwise: > That would exit without releasing the neighbor reference. +-DLS -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Mar 18, 2014 at 9:57 AM, David Stevens <dlstevens@us.ibm.com> wrote: > > >>From: Cong Wang > >> >>Nit: move it right after arp_create(). Otherwise: >> > > That would exit without releasing the neighbor reference. > Ah, then it's ok. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: David L Stevens <dlstevens@us.ibm.com> Date: Tue, 18 Mar 2014 12:32:29 -0400 > 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> Applied, thanks. Please refer to subsystems in your Subject lines using lowercase letters, as is the convention these days. I've fixed it up this time. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index eb59b14..570792c 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1315,6 +1315,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;
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> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html