[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHC9VhTobH9ExRt5fLx+S9ibRipeA4pj8yFhjDKb0Buq6naD5A@mail.gmail.com>
Date: Tue, 19 Oct 2021 12:29:11 -0400
From: Paul Moore <paul@...l-moore.com>
To: Florian Westphal <fw@...len.de>
Cc: Naresh Kamboju <naresh.kamboju@...aro.org>,
open list <linux-kernel@...r.kernel.org>,
selinux@...r.kernel.org,
Linux-Next Mailing List <linux-next@...r.kernel.org>,
Netdev <netdev@...r.kernel.org>, lkft-triage@...ts.linaro.org,
Eric Paris <eparis@...isplace.org>,
Stephen Smalley <stephen.smalley.work@...il.com>,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [next] BUG: kernel NULL pointer dereference, address:: selinux_ip_postroute_compat
On Tue, Oct 19, 2021 at 9:10 AM Florian Westphal <fw@...len.de> wrote:
>
> Naresh Kamboju <naresh.kamboju@...aro.org> wrote:
> > Following kernel crash noticed on linux next 20211019 tag.
> > on x86, i386 and other architectures.
>
> Paul, this might be caused by
> 1d1e1ded13568be81a0e19d228e310a48997bec8
> ("selinux: make better use of the nf_hook_state passed to the NF
> hooks"), in particular this hunk here:
>
> - if (sk == NULL)
> + if (state->sk == NULL)
> return NF_ACCEPT;
> + sk = skb_to_full_sk(skb);
> sksec = sk->sk_security;
>
> state->sk might not be related to skb->sk.
> I suspect that this should instead be:
>
> + sk = skb_to_full_sk(skb);
> if (sk == NULL)
>
> See 7026b1ddb6b8d4e6ee33dc2bd06c0ca8746fa7ab for the origin of this
> additional socket pointer.
Sure, I'll patch that up now.
--
paul moore
www.paul-moore.com
Powered by blists - more mailing lists