From: Al Viro <viro@zeniv.linux.org.uk>
To: Hillf Danton <hdanton@sina.com>
Cc: syzbot <syzbot+75867c44841cb6373570@syzkaller.appspotmail.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com,
Markus Elfring <Markus.Elfring@web.de>
Subject: Re: KASAN: use-after-free Read in userfaultfd_release (2)
Date: Mon, 20 Jul 2020 17:00:59 +0100 [thread overview]
Message-ID: <20200720160059.GO2786714@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20200713084512.10416-1-hdanton@sina.com>
On Mon, Jul 13, 2020 at 04:45:12PM +0800, Hillf Danton wrote:
> Bridge the gap between slab free and the fput in task work wrt
> file's private data.
No. This
> @@ -2048,6 +2055,7 @@ SYSCALL_DEFINE1(userfaultfd, int, flags)
>
> fd = get_unused_fd_flags(O_RDONLY | O_CLOEXEC);
> if (fd < 0) {
> + file->private_data = NULL;
> fput(file);
> goto out;
> }
>
is fundamentally wrong; you really shouldn't take over the cleanups
if you ever do fput().
next prev parent reply other threads:[~2020-07-20 16:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 2:24 KASAN: use-after-free Read in userfaultfd_release (2) syzbot
2020-07-13 15:34 ` syzbot
2020-07-17 15:05 ` Qian Cai
2020-07-20 15:50 ` Qian Cai
2020-07-21 4:32 ` Stephen Rothwell
[not found] ` <20200713084512.10416-1-hdanton@sina.com>
2020-07-20 16:00 ` Al Viro [this message]
2020-07-20 23:46 ` Daniel Colascione
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=20200720160059.GO2786714@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=Markus.Elfring@web.de \
--cc=hdanton@sina.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+75867c44841cb6373570@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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.