From: Eric Biggers <ebiggers3@gmail.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: syzbot
<bot+998c483ca801a50e3ce5b63a845216588ada5e2a@syzkaller.appspotmail.com>,
linux-fsdevel@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
syzkaller-bugs@googlegroups.com,
Al Viro <viro@zeniv.linux.org.uk>,
Andrea Arcangeli <aarcange@redhat.com>,
Pavel Emelyanov <xemul@parallels.com>,
linux-mm@kvack.org
Subject: Re: KASAN: use-after-free Read in handle_userfault
Date: Tue, 9 Jan 2018 13:59:39 -0800 [thread overview]
Message-ID: <20180109215939.GA127462@gmail.com> (raw)
In-Reply-To: <20171127061517.GA26341@zzz.localdomain>
On Sun, Nov 26, 2017 at 10:15:17PM -0800, Eric Biggers wrote:
> +Cc aarcange@redhat.com, xemul@parallels.com, linux-mm@kvack.org
>
> On Fri, Oct 27, 2017 at 11:46:13AM +0200, Dmitry Vyukov wrote:
> > On Fri, Oct 27, 2017 at 11:44 AM, syzbot
> > <bot+998c483ca801a50e3ce5b63a845216588ada5e2a@syzkaller.appspotmail.com>
> > wrote:
> > > Hello,
> > >
> > > syzkaller hit the following crash on
> > > a31cc455c512f3f1dd5f79cac8e29a7c8a617af8
> > > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
> > > compiler: gcc (GCC) 7.1.1 20170620
> > > .config is attached
> > > Raw console output is attached.
> > > C reproducer is attached
> > > syzkaller reproducer is attached. See https://goo.gl/kgGztJ
> > > for information about syzkaller reproducers
> >
>
> Andrea or Pavel, can one of you please fix this? It's another use-after-free
> related to userfaultfd "fork events", and it can easily be triggered by an
> unprivileged user. It was reported a month ago already; the original report is
> here: https://groups.google.com/forum/#!topic/syzkaller-bugs/sS99S-Z-9No.
> (Please consider adding yourself and/or linux-mm to the MAINTAINERS file for
> fs/userfaultfd.c, so that you are Cc'ed on userfaultfd bug reports.) In
> userfaultfd_event_wait_completion(), called from dup_fctx(), the kernel is
> freeing the the new userfaultfd_ctx because the old one had all its fd's closed,
> but actually the new one is still in use by the new mm_struct.
>
Fixed now:
#syz fix: userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers3@gmail.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: syzbot
<bot+998c483ca801a50e3ce5b63a845216588ada5e2a@syzkaller.appspotmail.com>,
linux-fsdevel@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
syzkaller-bugs@googlegroups.com,
Al Viro <viro@zeniv.linux.org.uk>,
Andrea Arcangeli <aarcange@redhat.com>,
Pavel Emelyanov <xemul@parallels.com>,
linux-mm@kvack.org
Subject: Re: KASAN: use-after-free Read in handle_userfault
Date: Tue, 9 Jan 2018 13:59:39 -0800 [thread overview]
Message-ID: <20180109215939.GA127462@gmail.com> (raw)
In-Reply-To: <20171127061517.GA26341@zzz.localdomain>
On Sun, Nov 26, 2017 at 10:15:17PM -0800, Eric Biggers wrote:
> +Cc aarcange@redhat.com, xemul@parallels.com, linux-mm@kvack.org
>
> On Fri, Oct 27, 2017 at 11:46:13AM +0200, Dmitry Vyukov wrote:
> > On Fri, Oct 27, 2017 at 11:44 AM, syzbot
> > <bot+998c483ca801a50e3ce5b63a845216588ada5e2a@syzkaller.appspotmail.com>
> > wrote:
> > > Hello,
> > >
> > > syzkaller hit the following crash on
> > > a31cc455c512f3f1dd5f79cac8e29a7c8a617af8
> > > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
> > > compiler: gcc (GCC) 7.1.1 20170620
> > > .config is attached
> > > Raw console output is attached.
> > > C reproducer is attached
> > > syzkaller reproducer is attached. See https://goo.gl/kgGztJ
> > > for information about syzkaller reproducers
> >
>
> Andrea or Pavel, can one of you please fix this? It's another use-after-free
> related to userfaultfd "fork events", and it can easily be triggered by an
> unprivileged user. It was reported a month ago already; the original report is
> here: https://groups.google.com/forum/#!topic/syzkaller-bugs/sS99S-Z-9No.
> (Please consider adding yourself and/or linux-mm to the MAINTAINERS file for
> fs/userfaultfd.c, so that you are Cc'ed on userfaultfd bug reports.) In
> userfaultfd_event_wait_completion(), called from dup_fctx(), the kernel is
> freeing the the new userfaultfd_ctx because the old one had all its fd's closed,
> but actually the new one is still in use by the new mm_struct.
>
Fixed now:
#syz fix: userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails
next prev parent reply other threads:[~2018-01-09 21:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 9:44 KASAN: use-after-free Read in handle_userfault syzbot
2017-10-27 9:46 ` Dmitry Vyukov
2017-11-27 6:15 ` Eric Biggers
2017-11-27 6:15 ` Eric Biggers
2018-01-09 21:59 ` Eric Biggers [this message]
2018-01-09 21:59 ` Eric Biggers
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=20180109215939.GA127462@gmail.com \
--to=ebiggers3@gmail.com \
--cc=aarcange@redhat.com \
--cc=bot+998c483ca801a50e3ce5b63a845216588ada5e2a@syzkaller.appspotmail.com \
--cc=dvyukov@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=syzkaller-bugs@googlegroups.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xemul@parallels.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.