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

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


On Tue, Apr 07, 2020 at 01:16:10PM -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=15ce12cde00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=91b674b8f0368e69
> dashboard link: https://syzkaller.appspot.com/bug?extid=89a42836ac72e6a02d35
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14c69db7e00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17b8b02be00000
>
> 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=15f1b1fbe00000
> final crash: https://syzkaller.appspot.com/x/report.txt?x=17f1b1fbe00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=13f1b1fbe00000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+89a42836ac72e6a02d35@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