Re: KASAN: slab-out-of-bounds Read in kvm_read_guest_page

From: Sean Christopherson
Date: Tue Apr 07 2020 - 21:08:53 EST


On Tue, Apr 07, 2020 at 01:06:11PM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit: bef7b2a7 Merge tag 'devicetree-for-5.7' of git://git.kerne..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=16e40efbe00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=91b674b8f0368e69
> dashboard link: https://syzkaller.appspot.com/bug?extid=a65b3f8eec6b27650a25
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> userspace arch: i386
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14869db7e00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10d2731fe00000
>
> The bug was bisected to:
>
> commit 36947254e5f981aeeedab1c7dfa35fc34d330e80
> Author: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> Date: Tue Feb 18 21:07:32 2020 +0000
>
> KVM: Dynamically size memslot array based on number of used slots
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10a24a5de00000
> final crash: https://syzkaller.appspot.com/x/report.txt?x=12a24a5de00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=14a24a5de00000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+a65b3f8eec6b27650a25@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: 36947254e5f9 ("KVM: Dynamically size memslot array based on number of used slots")

#syz dup: KASAN: slab-out-of-bounds Read in __kvm_gfn_to_hva_cache_init