* [PATCH net] VXLAN: fix potential NULL dereference in arp_reduce()
@ 2014-03-18 16:32 David L Stevens
2014-03-18 16:53 ` Cong Wang
2014-03-18 20:10 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: David L Stevens @ 2014-03-18 16:32 UTC (permalink / raw)
To: David Miller, Stephen Hemminger; +Cc: netdev
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;
+
skb_reset_mac_header(reply);
__skb_pull(reply, skb_network_offset(reply));
reply->ip_summed = CHECKSUM_UNNECESSARY;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] VXLAN: fix potential NULL dereference in arp_reduce()
2014-03-18 16:32 [PATCH net] VXLAN: fix potential NULL dereference in arp_reduce() David L Stevens
@ 2014-03-18 16:53 ` Cong Wang
2014-03-18 16:57 ` David Stevens
2014-03-18 20:10 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Cong Wang @ 2014-03-18 16:53 UTC (permalink / raw)
To: David L Stevens; +Cc: David Miller, Stephen Hemminger, netdev
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] VXLAN: fix potential NULL dereference in arp_reduce()
2014-03-18 16:53 ` Cong Wang
@ 2014-03-18 16:57 ` David Stevens
2014-03-18 17:36 ` Cong Wang
0 siblings, 1 reply; 5+ messages in thread
From: David Stevens @ 2014-03-18 16:57 UTC (permalink / raw)
To: Cong Wang; +Cc: David Miller, netdev, Stephen Hemminger
>From: Cong Wang
>
>Nit: move it right after arp_create(). Otherwise:
>
That would exit without releasing the neighbor reference.
+-DLS
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] VXLAN: fix potential NULL dereference in arp_reduce()
2014-03-18 16:57 ` David Stevens
@ 2014-03-18 17:36 ` Cong Wang
0 siblings, 0 replies; 5+ messages in thread
From: Cong Wang @ 2014-03-18 17:36 UTC (permalink / raw)
To: David Stevens; +Cc: David Miller, netdev, Stephen Hemminger
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] VXLAN: fix potential NULL dereference in arp_reduce()
2014-03-18 16:32 [PATCH net] VXLAN: fix potential NULL dereference in arp_reduce() David L Stevens
2014-03-18 16:53 ` Cong Wang
@ 2014-03-18 20:10 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2014-03-18 20:10 UTC (permalink / raw)
To: dlstevens; +Cc: shemminger, netdev
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-18 20:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 16:32 [PATCH net] VXLAN: fix potential NULL dereference in arp_reduce() David L Stevens
2014-03-18 16:53 ` Cong Wang
2014-03-18 16:57 ` David Stevens
2014-03-18 17:36 ` Cong Wang
2014-03-18 20:10 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).