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]
Message-Id: <E1MsIhu-0002AY-F2@pomaz-ex.szeredi.hu>
Date:	Mon, 28 Sep 2009 18:04:10 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	Andreas Dilger <adilger@....com>
CC:	miklos@...redi.hu, Valdis.Kletnieks@...edu, linux@...blig.org,
	agruen@...e.de, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfs: new O_NODE open flag

On Mon, 28 Sep 2009, Andreas Dilger wrote:
> On Sep 28, 2009  12:25 +0200, Miklos Szeredi wrote:
> > BTW I just checked, and it is possible to re-open or promote an fd
> > opened with O_NODE like this:
> > 
> > 	char tmp[64];
> > 
> > 	fd = open(filename, O_NODE | O_NOACCESS);
> > 	/* ... */
> > 	sprintf(tmp, "/proc/self/fd/%i", fd);
> > 	fd_rw = open(tmp, O_RDWR);
> > 
> > Now fd_rw is guaranteed to refer to the same inode as fd.
> 
> It seems very unpleasant to require applications using O_NODE to
> reopen files using /proc.

The point of the above example was that reopening a file descriptor
with upgraded (or downgraded) access mode is even now possible.  Which
either means:

 a) the current permission model under /proc/PID/fd has a security
    hole (which Jamie is worried about)

 b) we can safely implement this with by changing openat() semantics,
    or even with a new reopen() syscall

I'm not too worried about the security aspect of this, but it's
something to keep in mind.

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ