Re: KASAN: use-after-free Read in locks_delete_block

From: Dmitry Vyukov
Date: Tue Nov 20 2018 - 08:23:26 EST


On Tue, Nov 20, 2018 at 12:08 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> On Tue, 2018-11-20 at 07:57 +0100, Dmitry Vyukov wrote:
>> On Sat, Nov 17, 2018 at 3:03 PM, Bruce Fields <bfields@xxxxxxxxxxxx> wrote:
>> > On Sat, Nov 17, 2018 at 08:33:27AM -0500, Jeff Layton wrote:
>> > > Thanks for the explanation, Dmitry. I've added the tag to the patch in
>> > > my tree. It should show up in linux-next soon.
>> > >
>> > > I still find it a little misleading to say that syzbot reported a bug
>> > > when it actually found a bug inside an earlier version of the patch, but
>> > > I'll just learn to get over it.
>> >
>> > The usual tag for someone that found a bug in an earlier version of a
>> > patch would be Reviewed-by:. Is there any reason we can't use that
>> > here? The "syzbot+..." email should be enough on its own, I can't see a
>> > reason why their scripts would need to require a particular tag. Or
>> > maybe we could use Tested-by:, or some other tag made up for this case?
>> >
>> > I do worry that someone who sees "Reported-by:..." might for example
>> > mistakenly assume that it would help to backport that patch if they see
>> > a similar-looking oops.
>>
>> I see. It may also be picked by scripts that detects patches that need
>> to be backported to stable because of the "Reported-by: syzbot" tag.
>> This is somewhat unfortunate.
>>
>> There is no problem parsing another tag on syzbot side. Does Tested-by
>> look good to you? If it found a bug in the patch and then it was
>> fixed, Tested-by looks reasonable. And we also detect
>> Reported-and-tested-by already because that's what syzbot suggests
>> after it tested a proposed fix for a bug.
>>
>> I am somewhat concerned how to spread this information across all
>> kernel developers. There is effectively no way to do this. We can't
>> expect people to read docs, they generally don't. I guess I just
>> document this at "See https://goo.gl/tpsmEJ for more information" and
>> then we can point other people there if/when this concern pops up
>> again.
>
> Tested-by sounds like it might be a reasonable fit. I'll change the
> patch in my tree to read that way.

Turns out this already works (we did not check exact tag, just search
for the right email with a hash). So I added a test for Tested-by tag
and extended the docs:
https://github.com/google/syzkaller/commit/9aca6b5240809308d9078a0a0f0707512c5b0220