Re: [syzbot] KASAN: use-after-free Read in post_one_notification

From: Eric Biggers
Date: Wed Aug 03 2022 - 00:09:54 EST


On Wed, Aug 03, 2022 at 09:34:10AM +0530, Siddh Raman Pant wrote:
> On Wed, 03 Aug 2022 03:57:19 +0530 Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
> > It appears this was already fixed, so no need for any more activity on this bug:
> >
> > #syz fix: watchqueue: make sure to serialize 'wqueue->defunct' properly
> >
> > - Eric
>
> It doesn't address the dangling pointer remaining in the watch_queue,
> which was the root cause of this crash. The use-after-free happened
> because the pipe was freed but a dangling pointer of it remained in
> a watch_queue, and an attempt to dereference it was there.
>

I don't think that's true; the pointer doesn't get dereferenced after
watch_queue::defunct is set. See my message on the other thread where I
explained this: https://lore.kernel.org/lkml/YunKlJCDlmyn2hJ4@sol.localdomain

Of course, if you actually have a reproducer, or a KASAN report, or anything at
all that shows there is still a problem, then please post it.

- Eric