lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200720160059.GO2786714@ZenIV.linux.org.uk>
Date:   Mon, 20 Jul 2020 17:00:59 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Hillf Danton <hdanton@...a.com>
Cc:     syzbot <syzbot+75867c44841cb6373570@...kaller.appspotmail.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzkaller-bugs@...glegroups.com,
        Markus Elfring <Markus.Elfring@....de>
Subject: Re: KASAN: use-after-free Read in userfaultfd_release (2)

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().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ