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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230427010715.GX3390869@ZenIV>
Date:   Thu, 27 Apr 2023 02:07:15 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Christian Brauner <brauner@...nel.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] pidfd updates

On Tue, Apr 25, 2023 at 02:34:15PM +0200, Christian Brauner wrote:


> struct fd_file {
> 	struct file *file;
> 	int fd;
> 	int __user *fd_user;

Why is it an int?  Because your case has it that way?

We have a bunch of places where we have an ioctl with
a field in some structure filled that way; any primitive
that combines put_user() with descriptor handling is
going to cause trouble as soon as somebody deals with
a structure where such member is unsigned long.  Gets
especially funny on 64bit big-endian...

And that objection is orthogonal to that 3-member structure -
even if you pass int __user * as an explicit argument into
your helper, the same trouble will be there.

Al, still going through that zoo...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ