All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: syzbot <syzbot+b437b5a429d680cf2217@syzkaller.appspotmail.com>
Cc: darrick.wong@oracle.com, hannes@cmpxchg.org, hughd@google.com,
	jack@suse.cz, josef@toxicpanda.com, jrdr.linux@gmail.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	sfr@canb.auug.org.au, syzkaller-bugs@googlegroups.com,
	willy@infradead.org
Subject: Re: KASAN: use-after-free Read in filemap_fault
Date: Fri, 28 Dec 2018 13:09:38 -0800	[thread overview]
Message-ID: <20181228130938.c9e42c213cdcc35a93dd0dac@linux-foundation.org> (raw)
In-Reply-To: <000000000000b57d19057e1b383d@google.com>

On Fri, 28 Dec 2018 12:51:04 -0800 syzbot <syzbot+b437b5a429d680cf2217@syzkaller.appspotmail.com> wrote:

> Hello,
> 
> syzbot found the following crash on:

uh-oh.  Josef, could you please take a look?

:	page = find_get_page(mapping, offset);
: 	if (likely(page) && !(vmf->flags & FAULT_FLAG_TRIED)) {
: 		/*
: 		 * We found the page, so try async readahead before
: 		 * waiting for the lock.
: 		 */
: 		fpin = do_async_mmap_readahead(vmf, page);
: 	} else if (!page) {
: 		/* No page in the page cache at all */
: 		fpin = do_sync_mmap_readahead(vmf);
: 		count_vm_event(PGMAJFAULT);
: 		count_memcg_event_mm(vmf->vma->vm_mm, PGMAJFAULT);

vmf->vma has been freed at this point.

: 		ret = VM_FAULT_MAJOR;
: retry_find:
: 		page = pagecache_get_page(mapping, offset,
: 					  FGP_CREAT|FGP_FOR_MMAP,
: 					  vmf->gfp_mask);
: 		if (!page) {
: 			if (fpin)
: 				goto out_retry;
: 			return vmf_error(-ENOMEM);
: 		}
: 	}


  reply	other threads:[~2018-12-28 21:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-28 20:51 KASAN: use-after-free Read in filemap_fault syzbot
2018-12-28 20:51 ` syzbot
2018-12-28 21:09 ` Andrew Morton [this message]
2018-12-28 23:51   ` Kirill A. Shutemov
2018-12-29  6:38     ` Dmitry Vyukov
2018-12-29  6:38       ` Dmitry Vyukov
2018-12-28 22:01 ` Kirill A. Shutemov
2018-12-28 22:08   ` Kirill A. Shutemov

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=20181228130938.c9e42c213cdcc35a93dd0dac@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=darrick.wong@oracle.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sfr@canb.auug.org.au \
    --cc=syzbot+b437b5a429d680cf2217@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.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 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.