Re: NULL pointer dereference in rt6_get_cookie()

2015-10-14 Thread Martin KaFai Lau
On Tue, Oct 13, 2015 at 09:26:41PM +0200, Phil Sutter wrote: > I have backed up the rt pointer at top of the function and restored it > before pr_err, this is the output: > > | rt6i_dst:2001:4dd0:ff3b:13::/64 rt6i_gateway::: rt6i_flags:4001 > dst.flags: Hi Phil, Can you try the

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-14 Thread Phil Sutter
Hi Martin, On Tue, Oct 13, 2015 at 11:14:21PM -0700, Martin KaFai Lau wrote: > On Tue, Oct 13, 2015 at 09:26:41PM +0200, Phil Sutter wrote: > > I have backed up the rt pointer at top of the function and restored it > > before pr_err, this is the output: > > > > | rt6i_dst:2001:4dd0:ff3b:13::/64

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-14 Thread Martin KaFai Lau
On Thu, Oct 15, 2015 at 12:34:13AM +0200, Phil Sutter wrote: > Hi Martin, > > On Tue, Oct 13, 2015 at 11:14:21PM -0700, Martin KaFai Lau wrote: > > On Tue, Oct 13, 2015 at 09:26:41PM +0200, Phil Sutter wrote: > > > I have backed up the rt pointer at top of the function and restored it > > > before

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-13 Thread Phil Sutter
On Tue, Oct 13, 2015 at 09:10:39PM +0200, Phil Sutter wrote: > Hi Martin, > > On Tue, Oct 13, 2015 at 11:14:43AM -0700, Martin KaFai Lau wrote: > > On Sat, Oct 10, 2015 at 03:24:37PM +0200, Phil Sutter wrote: > > > The conditional at the start of the function evaluates true, since > > >

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-13 Thread Phil Sutter
Hi Martin, On Tue, Oct 13, 2015 at 11:14:43AM -0700, Martin KaFai Lau wrote: > On Sat, Oct 10, 2015 at 03:24:37PM +0200, Phil Sutter wrote: > > The conditional at the start of the function evaluates true, since > > 'rt->rt6i_flags & RTF_PCPU' is non-zero. > Hi Phil, can you try the following

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-13 Thread Martin KaFai Lau
On Tue, Oct 13, 2015 at 09:10:39PM +0200, Phil Sutter wrote: > Hi Martin, > > On Tue, Oct 13, 2015 at 11:14:43AM -0700, Martin KaFai Lau wrote: > > On Sat, Oct 10, 2015 at 03:24:37PM +0200, Phil Sutter wrote: > > > The conditional at the start of the function evaluates true, since > > >

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-13 Thread Martin KaFai Lau
On Sat, Oct 10, 2015 at 03:24:37PM +0200, Phil Sutter wrote: > The conditional at the start of the function evaluates true, since > 'rt->rt6i_flags & RTF_PCPU' is non-zero. Hi Phil, can you try the following patch and capture the dmesg output to confirm the value of rt->rt6i_flags and the

Re: NULL pointer dereference in rt6_get_cookie()

2015-10-12 Thread Martin KaFai Lau
On Sat, Oct 10, 2015 at 03:24:37PM +0200, Phil Sutter wrote: > Using printk-debugging I could track down the problem to > rt6_get_cookie() function in include/net/ip6_fib.h: > > The conditional at the start of the function evaluates true, since > 'rt->rt6i_flags & RTF_PCPU' is non-zero. Due to

NULL pointer dereference in rt6_get_cookie()

2015-10-10 Thread Phil Sutter
Hi, Linux 4.2.0 and above dereferences a NULL pointer for me when sending an IPsec secured packet for the first time. I use kernel IPsec with racoon and setkey. This is what my configuration looks like: Local host: 2001:4dd0:ff3b:13::23 Remote host: 2001:4dd0:ff3b:13::5 Setkey instructions: |