Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-21 Thread David Miller
From: David Ahern Date: Wed, 19 Apr 2017 14:19:43 -0700 > Andrey reported a fault in the IPv6 route code: > > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN > Modules linked in: > CPU: 1 PID: 4035 Comm: a.out Not tainted 4.11.0-

Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-20 Thread Martin KaFai Lau
On Thu, Apr 20, 2017 at 04:37:18PM -0700, Cong Wang wrote: > On Thu, Apr 20, 2017 at 3:43 PM, David Ahern wrote: > > > > I scanned the others. It is not clear that others should fail with > > EINVAL. Certainly a mask of unused flags can be added, but to me that is > > on top of this bug fix. > > >

Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-20 Thread Martin KaFai Lau
On Thu, Apr 20, 2017 at 04:43:03PM -0600, David Ahern wrote: > On 4/20/17 4:39 PM, Cong Wang wrote: > > On Wed, Apr 19, 2017 at 2:19 PM, David Ahern > > wrote: > >> > >> Fix by checking for the flag and failing with EINVAL. > >> > > > > I am still not sure about this. There are a few unused bits

Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-20 Thread Cong Wang
On Thu, Apr 20, 2017 at 3:43 PM, David Ahern wrote: > > I scanned the others. It is not clear that others should fail with > EINVAL. Certainly a mask of unused flags can be added, but to me that is > on top of this bug fix. > If we want to preserve those unused bits, we should reject them too. R

Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-20 Thread David Ahern
On 4/20/17 4:39 PM, Cong Wang wrote: > On Wed, Apr 19, 2017 at 2:19 PM, David Ahern wrote: >> >> Fix by checking for the flag and failing with EINVAL. >> > > I am still not sure about this. There are a few unused bits in > this flag, we simply ignore the rest, right? Why should we > reject this o

Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-20 Thread Cong Wang
On Wed, Apr 19, 2017 at 2:19 PM, David Ahern wrote: > > Fix by checking for the flag and failing with EINVAL. > I am still not sure about this. There are a few unused bits in this flag, we simply ignore the rest, right? Why should we reject this one instead of all of those we don't use?

Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-20 Thread Andrey Konovalov
Thanks! Tested-by: Andrey Konovalov On Wed, Apr 19, 2017 at 11:52 PM, Martin KaFai Lau wrote: > On Wed, Apr 19, 2017 at 02:19:43PM -0700, David Ahern wrote: >> Andrey reported a fault in the IPv6 route code: >> >> kasan: GPF could be caused by NULL-ptr deref or user memory access >> general pro

Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-19 Thread Martin KaFai Lau
On Wed, Apr 19, 2017 at 02:19:43PM -0700, David Ahern wrote: > Andrey reported a fault in the IPv6 route code: > > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN > Modules linked in: > CPU: 1 PID: 4035 Comm: a.out Not tainted 4.11.

[PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-19 Thread David Ahern
Andrey reported a fault in the IPv6 route code: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN Modules linked in: CPU: 1 PID: 4035 Comm: a.out Not tainted 4.11.0-rc7+ #250 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS