From: Steffen Klassert <steffen.klassert@secunet.com>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: <herbert@gondor.apana.org.au>,
Jean-Philippe Menil <jpmenil@gmail.com>, <davem@davemloft.net>,
<netdev@vger.kernel.org>, <kuznet@ms2.inr.ac.ru>,
<yoshfuji@linux-ipv6.org>
Subject: Re: [BUG] xfrm: unable to handle kernel NULL pointer dereference
Date: Fri, 16 Nov 2018 20:12:46 +0100 [thread overview]
Message-ID: <20181116191246.GN8742@gauss3.secunet.de> (raw)
In-Reply-To: <20181116184800.GY16768@wantstofly.org>
On Fri, Nov 16, 2018 at 08:48:00PM +0200, Lennert Buytenhek wrote:
> On Sat, Nov 10, 2018 at 08:34:34PM +0100, Jean-Philippe Menil wrote:
>
> > we're seeing unexpected crashes from kernel 4.15 to 4.18.17, using
> > IPsec VTI interfaces, on several vpn hosts, since upgrade from 4.4.
>
> I looked into this with Jean-Philippe, and it appears to be crashing
> on a NULL pointer dereference in the inlined xfrm_policy_check() call
> in vti_rcv_cb(), and specifically on the skb_dst(skb) dereference in
> __xfrm_policy_check2():
>
> return (!net->xfrm.policy_count[dir] && !skb->sp) ||
> (skb_dst(skb)->flags & DST_NOPOLICY) || <=====
> __xfrm_policy_check(sk, ndir, skb, family);
>
> Commit 9e1437937807 ("xfrm: Fix NULL pointer dereference when
> skb_dst_force clears the dst_entry.") fixes a very similar problem on
> the output and forward paths, but our issue seems to be triggering on
> the input path.
Yes, this is the same problem. skb_dst_force() does not
really force a refcount anymore, it might clear the dst
pointer instead (maybe this function should be renamed).
Want to submit a fix? If not I'll go to fix that.
Thanks!
next prev parent reply other threads:[~2018-11-17 5:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 19:34 [BUG] xfrm: unable to handle kernel NULL pointer dereference Jean-Philippe Menil
2018-11-16 18:48 ` Lennert Buytenhek
2018-11-16 19:12 ` Steffen Klassert [this message]
2018-11-22 6:44 ` Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181116191246.GN8742@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=buytenh@wantstofly.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jpmenil@gmail.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox