[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190313194313.GB10169@gmail.com>
Date: Wed, 13 Mar 2019 12:43:14 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Theodore Ts'o <tytso@....edu>, Amir Goldstein <amir73il@...il.com>,
Richard Weinberger <richard@....at>,
Miklos Szeredi <miklos@...redi.hu>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-fscrypt@...r.kernel.org,
overlayfs <linux-unionfs@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Paul Lawrence <paullawrence@...gle.com>
Subject: Re: overlayfs vs. fscrypt
On Wed, Mar 13, 2019 at 07:19:46PM +0000, Al Viro wrote:
> On Wed, Mar 13, 2019 at 09:44:33AM -0700, Eric Biggers wrote:
>
> > > Just to make sure - you do realize that ban on multiple dentries refering
> > > to the same directory inode is *NOT* conditional upon those dentries being
> > > hashed, right?
> >
> > Isn't this handled by d_splice_alias() already, by moving the old dentry to the
> > new name?
>
> ... which means that if somebody without the key chdirs into subdirectory
> they only see by encrypted name and waits for proper owner to look it up,
> they suddenly see it by _un_encrypted name. Or does O_PATH open, for
> that matter, so exec permissions on that thing are not required.
Is there a real problem here? After the key is added, the filenames are
supposed to be shown in plaintext, not ciphertext. This is intrinsic to the
fact that we don't support both "views" at the same time. Either the directory
has the key or it does not.
If someone is using ciphertext view (e.g. doing a directory traversal)
concurrently with the key being added, that can certainly break things. But the
ciphertext view only allows a very restricted set of actions such as deleting
files. And if such actions are necessary, the system userspace is meant to be
designed in such a way that adding the key can't race with it.
- Eric
Powered by blists - more mailing lists