Re: [PATCH] radix-tree: avoid NULL dereference

From: Matthew Wilcox
Date: Fri Jul 06 2018 - 20:14:46 EST


On Fri, Jul 06, 2018 at 02:45:34PM -0700, Andrew Morton wrote:
> On Fri, 6 Jul 2018 16:36:41 +0100 Mark Rutland <mark.rutland@xxxxxxx> wrote:
>
> > > >
> > > > Acked-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> > >
> > > Cheers!
> > >
> > > I assume that Andrew will pick this up, if he's also happy with it.
> >
> > I've just started fuzzing, and found this also applies with
> > node_tag_set(). I'll spin a v2 with that fixed up, too.
>
> Thanks. Please also give some thought to whether the fix should be
> backported and if so, which patch(es) it Fixes:.

I would say this goes all the way back to
0a835c4f090 ("Reimplement IDR and IDA using the radix tree")

I don't know if it's worth backporting though. If the compiler does
the normal optimisation, nobody will hit it. If it doesn't, the first
use of an IDR will trip the bug. So it's not like a user-exploitable bug.