mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: syzbot <syzbot+9d1d9866b0b8ee6e0a8c@syzkaller.appspotmail.com>
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, mhiramat@kernel.org,
	mingo@redhat.com, syzkaller-bugs@googlegroups.com,
	tglx@linutronix.de, x86@kernel.org, syzkaller@googlegroups.com
Subject: Re: KASAN: alloca-out-of-bounds Read in unwind_next_frame
Date: Fri, 6 Apr 2018 10:36:33 -0500	[thread overview]
Message-ID: <20180406153633.lex32dujz747ycm5@treble> (raw)
In-Reply-To: <94eb2c05611408a11a056922c4cb@google.com>

On Thu, Apr 05, 2018 at 05:02:02PM -0700, syzbot wrote:
> Hello,
> 
> syzbot hit the following crash on upstream commit
> 06dd3dfeea60e2a6457a6aedf97afc8e6d2ba497 (Thu Apr 5 03:07:20 2018 +0000)
> Merge tag 'char-misc-4.17-rc1' of
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
> syzbot dashboard link:
> https://syzkaller.appspot.com/bug?extid=9d1d9866b0b8ee6e0a8c
> 
> syzkaller reproducer:
> https://syzkaller.appspot.com/x/repro.syz?id=6478299081474048
> Raw console output:
> https://syzkaller.appspot.com/x/log.txt?id=5324218015154176
> Kernel config: https://syzkaller.appspot.com/x/.config?id=216543573824217049
> compiler: gcc (GCC) 8.0.1 20180301 (experimental)
> 
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+9d1d9866b0b8ee6e0a8c@syzkaller.appspotmail.com
> It will help syzbot understand when the bug is fixed. See footer for
> details.
> If you forward the report, please keep this part and the footer.
> 
> ==================================================================
> BUG: KASAN: alloca-out-of-bounds in __read_once_size
> include/linux/compiler.h:188 [inline]
> BUG: KASAN: alloca-out-of-bounds in unwind_next_frame.part.7+0x7ce/0x9c0
> arch/x86/kernel/unwind_frame.c:326
> Read of size 8 at addr ffff8801b05e67f8 by task syz-executor2/11326

This looks like a KASAN bug.

The FP unwinder was unwinding from an interrupt which hit while running
in kasan_unpoison_shadow():

> RIP: 0010:kasan_unpoison_shadow+0x1/0x50 mm/kasan/kasan.c:68
> RSP: 0018:ffff8801b05e67e8 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13
> RAX: ffff8801c1b24100 RBX: 0000000000000000 RCX: ffffffff859d4219
> RDX: 0000000000000000 RSI: 00000000000000a8 RDI: ffff8801b05e6760
> RBP: ffff8801b05e67f8 R08: ffff8801c1b24100 R09: ffffed003b6046c2
> R10: ffffed003b6046c2 R11: ffff8801db023613 R12: 0000000000000015
> R13: 0000000000000001 R14: 0000000000000016 R15: dffffc0000000000

So at first glance it seemed like a race condition.  However, the
unwinder was only trying to dereference the frame pointer (RBP:
ffff8801b05e67f8), which should have never been poisoned in the first
place.

So it looks like a bug in the KASAN alloca poisoning.

-- 
Josh

  parent reply	other threads:[~2018-04-06 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06  0:02 syzbot
2018-04-06  9:09 ` Dmitry Vyukov
2018-04-06 15:36 ` Josh Poimboeuf [this message]
2018-04-06 15:40   ` Dmitry Vyukov
2018-04-06 16:53     ` Josh Poimboeuf
2018-04-13 11:16       ` Dmitry Vyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180406153633.lex32dujz747ycm5@treble \
    --to=jpoimboe@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=syzbot+9d1d9866b0b8ee6e0a8c@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=syzkaller@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®