Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-14 Thread Eric W. Biederman
Florian Westphal writes: > Eric W. Biederman wrote: >> Florian Westphal writes: >> >> > Eric W. Biederman wrote: >> >> Florian could you test and verify this patch fixes your issues? >> > >> > Yes, this seems to work. >> > >> > Pablo, I'm fine with this patch going into -nf/stable but I do no

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-14 Thread Florian Westphal
Eric W. Biederman wrote: > Florian Westphal writes: > > > Eric W. Biederman wrote: > >> Florian could you test and verify this patch fixes your issues? > > > > Yes, this seems to work. > > > > Pablo, I'm fine with this patch going into -nf/stable but I do not think > > making the pointers per n

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-13 Thread Eric W. Biederman
Florian Westphal writes: > Eric W. Biederman wrote: >> Florian could you test and verify this patch fixes your issues? > > Yes, this seems to work. > > Pablo, I'm fine with this patch going into -nf/stable but I do not think > making the pointers per netns is a desireable option in the long term

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-13 Thread Florian Westphal
Eric W. Biederman wrote: > Florian could you test and verify this patch fixes your issues? Yes, this seems to work. Pablo, I'm fine with this patch going into -nf/stable but I do not think making the pointers per netns is a desireable option in the long term. > Unlike the other possibilities th

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-13 Thread Florian Westphal
Eric W. Biederman wrote: > Florian Westphal writes: > > > Eric W. Biederman wrote: > >> > AFAICS no other callers do something similar, but yes, > >> > we'd need this all over the place if there are others. > >> > > >> > Maybe we need a saner fix, e.g. by adding bounds check to net_generic(), >

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-13 Thread Eric W. Biederman
Florian could you test and verify this patch fixes your issues? Unlike the other possibilities that have been discussed this also addresses the nf_queue path as well as the nf_queue_hook_drop path. And frankly that is the best argument I have for fixing it this way because potentially nf_queue c

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-13 Thread Eric W. Biederman
Florian Westphal writes: > Eric W. Biederman wrote: >> > AFAICS no other callers do something similar, but yes, >> > we'd need this all over the place if there are others. >> > >> > Maybe we need a saner fix, e.g. by adding bounds check to net_generic(), >> > and making sure that net_generic() r

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-13 Thread Florian Westphal
Eric W. Biederman wrote: > > AFAICS no other callers do something similar, but yes, > > we'd need this all over the place if there are others. > > > > Maybe we need a saner fix, e.g. by adding bounds check to net_generic(), > > and making sure that net_generic() returns non-NULL only if the per >

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-13 Thread Eric W. Biederman
Florian Westphal writes: > Eric W. Biederman wrote: >> > On Wed, May 11, 2016 at 05:41:13PM +0200, Florian Westphal wrote: >> >> diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c >> >> index 5baa8e2..9722819 100644 >> >> --- a/net/netfilter/nf_queue.c >> >> +++ b/net/netfilter/nf_

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-12 Thread Florian Westphal
Eric W. Biederman wrote: > > On Wed, May 11, 2016 at 05:41:13PM +0200, Florian Westphal wrote: > >> diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c > >> index 5baa8e2..9722819 100644 > >> --- a/net/netfilter/nf_queue.c > >> +++ b/net/netfilter/nf_queue.c > >> @@ -102,6 +102,13 @@

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-12 Thread Eric W. Biederman
Pablo Neira Ayuso writes: > On Wed, May 11, 2016 at 05:41:13PM +0200, Florian Westphal wrote: >> diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c >> index 5baa8e2..9722819 100644 >> --- a/net/netfilter/nf_queue.c >> +++ b/net/netfilter/nf_queue.c >> @@ -102,6 +102,13 @@ void nf_qu

Re: [PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-12 Thread Pablo Neira Ayuso
On Wed, May 11, 2016 at 05:41:13PM +0200, Florian Westphal wrote: > diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c > index 5baa8e2..9722819 100644 > --- a/net/netfilter/nf_queue.c > +++ b/net/netfilter/nf_queue.c > @@ -102,6 +102,13 @@ void nf_queue_nf_hook_drop(struct net *net, s

[PATCH nf V2] netfilter: fix oops in nfqueue during netns error unwinding

2016-05-11 Thread Florian Westphal
Under full load (unshare() in loop -> OOM conditions) we can get kernel panic: BUG: unable to handle kernel NULL pointer dereference at 0008 IP: [] nfqnl_nf_hook_drop+0x35/0x70 [..] task: 88012dfa3840 ti: 88012dffc000 task.ti: 88012dffc000 RIP: 0010:[] [] nfqnl_nf_hook_dr