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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 17 Apr 2021 20:35:18 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Eric Dumazet <eric.dumazet@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH] x86/uaccess: small optimization in unsafe_copy_to_user()

On Sat, Apr 17, 2021 at 08:30:42PM +0000, Al Viro wrote:

> and that thing is still there.  However, it does *NOT* do what it might
> appear to be doing; it ends up with getdents() returning -EINVAL instead.
> What we need is
> 			buf->error = -EINTR;
> in addition to that return (in all 3 such places).  Do you have any problems with
> the following delta?

No, wait - we have non-NULL buf->prev_reclen, so we'll hit
        if (buf.prev_reclen) {
		struct compat_linux_dirent __user * lastdirent;
		lastdirent = (void __user *)buf.current_dir - buf.prev_reclen;

		if (put_user(buf.ctx.pos, &lastdirent->d_off)) 
			error = -EFAULT;
		else
			error = count - buf.count;
	}
with buf->error completely ignored.  Nevermind.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ