Re: KASAN: stack-out-of-bounds Write in notify_die

From: Dmitry Vyukov
Date: Sat May 26 2018 - 05:26:42 EST


#syz dup: KASAN: use-after-free Read in do_general_protection

On Sat, May 26, 2018 at 11:13 AM, syzbot
<syzbot+cadaa9a49085b3cc83d3@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit: 203ec2fed17a Merge tag 'armsoc-fixes' of git://git.kernel...
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=14feff97800000
> kernel config: https://syzkaller.appspot.com/x/.config?x=f3b4e30da84ec1ed
> dashboard link: https://syzkaller.appspot.com/bug?extid=cadaa9a49085b3cc83d3
> compiler: gcc (GCC) 8.0.1 20180413 (experimental)
>
> Unfortunately, I don't have any reproducer for this crash yet.
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+cadaa9a49085b3cc83d3@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> ==================================================================
> BUG: KASAN: stack-out-of-bounds in notify_die+0x291/0x2b0
> kernel/notifier.c:539
> Write of size 8 at addr ffff8801c74d7258 by task syz-executor7/17787
>
> CPU: 1 PID: 17787 Comm: syz-executor7 Not tainted 4.17.0-rc5+ #60
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> Google 01/01/2011
> Call Trace:
> __dump_stack lib/dump_stack.c:77 [inline]
> dump_stack+0x1b9/0x294 lib/dump_stack.c:113
> print_address_description+0x6c/0x20b mm/kasan/report.c:256
> kasan_report_error mm/kasan/report.c:354 [inline]
> kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412
> __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:438
> notify_die+0x291/0x2b0 kernel/notifier.c:539
> do_general_protection+0x248/0x2f0 arch/x86/kernel/traps.c:558
> general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1159
> RIP: 0010:msr_write_intercepted arch/x86/kvm/vmx.c:2132 [inline]
> RIP: 0010:vmx_vcpu_run+0xa2f/0x25f0 arch/x86/kvm/vmx.c:9871
> RSP: 0018:ffff8801c74d73b0 EFLAGS: 00010006
> RAX: dffffc0000000000 RBX: 0000000010000000 RCX: ffffffff811f778f
> RDX: 000000000836b156 RSI: ffffffff811f779c RDI: 0000000000000005
> RBP: ffff8801c74d7898 R08: ffff8801ab74e140 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
> R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
>
> The buggy address belongs to the page:
> page:ffffea00071d35c0 count:0 mapcount:0 mapping:0000000000000000 index:0x0
> flags: 0x2fffc0000000000()
> raw: 02fffc0000000000 0000000000000000 0000000000000000 00000000ffffffff
> raw: 0000000000000000 ffffea00071d0101 0000000000000000 0000000000000000
> page dumped because: kasan: bad access detected
>
> Memory state around the buggy address:
> ffff8801c74d7100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff8801c74d7180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>
>> ffff8801c74d7200: 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 f3 f3
>
> ^
> ffff8801c74d7280: f3 f3 00 f2 f2 f2 f2 f2 f2 f2 00 00 f2 f2 f3 f3
> ffff8801c74d7300: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ==================================================================
>
>
> ---
> This bug is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxxx
>
> syzbot will keep track of this bug report. See:
> https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
> syzbot.
>
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-bugs+unsubscribe@xxxxxxxxxxxxxxxxx
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-bugs/0000000000009b811c056d184aa8%40google.com.
> For more options, visit https://groups.google.com/d/optout.