public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: syzbot <syzbot+a95c7753605c9d219466@syzkaller.appspotmail.com>,
	akpm@linux-foundation.org, bgeffon@google.com,
	dvhart@infradead.org, linux-kernel@vger.kernel.org,
	mingo@redhat.com, peterz@infradead.org,
	syzkaller-bugs@googlegroups.com, torvalds@linux-foundation.org
Subject: Re: general protection fault in get_futex_key
Date: Wed, 8 Apr 2020 11:14:43 -0400	[thread overview]
Message-ID: <20200408151443.GF66033@xz-x1> (raw)
In-Reply-To: <87mu7mayky.fsf@nanos.tec.linutronix.de>

On Wed, Apr 08, 2020 at 03:36:45PM +0200, Thomas Gleixner wrote:
> syzbot <syzbot+a95c7753605c9d219466@syzkaller.appspotmail.com> writes:
> > syzbot found the following crash on:
> >
> > HEAD commit:    763dede1 Merge tag 'for-linus-5.7-rc1' of git://git.kernel..
> > git tree:       upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=136a055de00000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=12205d036cec317f
> > dashboard link: https://syzkaller.appspot.com/bug?extid=a95c7753605c9d219466
> > compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1578287de00000
> >
> > The bug was bisected to:
> >
> > commit 4426e945df588f2878affddf88a51259200f7e29
> > Author: Peter Xu <peterx@redhat.com>
> > Date:   Thu Apr 2 04:08:49 2020 +0000
> >
> >     mm/gup: allow VM_FAULT_RETRY for multiple times
> >
> > bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=1707878fe00000
> > final crash:    https://syzkaller.appspot.com/x/report.txt?x=1487878fe00000
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1087878fe00000
> >
> > IMPORTANT: if you fix the bug, please add the following tag to the commit:
> > Reported-by: syzbot+a95c7753605c9d219466@syzkaller.appspotmail.com
> > Fixes: 4426e945df58 ("mm/gup: allow VM_FAULT_RETRY for multiple times")
> >
> > general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
> > KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
> > CPU: 1 PID: 8869 Comm: syz-executor.1 Not tainted 5.6.0-syzkaller #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> > RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline]
> > RIP: 0010:compound_head include/linux/page-flags.h:174 [inline]
> > RIP: 0010:get_futex_key+0x2cd/0x1670 kernel/futex.c:574
> 
> This means that
> 
>      get_user_pages_fast(address, 1, FOLL_WRITE, &page)
> 
> returned 0, which is breaking the interface:
> 
>  * Returns number of pages pinned. This may be fewer than the number requested.
>  * If nr_pages is 0 or negative, returns 0. If no pages were pinned, returns
>  * -errno.
> 
> nr_pages is clearly 1. So if the call fails, the number of pinned pages
> is 0 and it should return a proper error number. It did before.
> 
> From a quick look at the commit in question I assume it's the
> 
> +               if (fatal_signal_pending(current))
> +                       break;
> 
> which can cause that to happen.

Right, sorry for the mess.

Hillf has posted a fix already in the other thread (with you CCed).
So I'm marking this one as a dup now.

#syz dup: WARNING in af_alg_make_sg

Thanks,

-- 
Peter Xu


      parent reply	other threads:[~2020-04-08 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 10:08 general protection fault in get_futex_key syzbot
2020-04-08 13:36 ` Thomas Gleixner
2020-04-08 15:09   ` Peter Zijlstra
2020-04-08 15:14   ` Peter Xu [this message]

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=20200408151443.GF66033@xz-x1 \
    --to=peterx@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bgeffon@google.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=syzbot+a95c7753605c9d219466@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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