Return-Path: Date: Sun, 17 Mar 2019 20:38:22 +0000 From: Al Viro Subject: Re: [PATCH 1/5] fscrypt: clean up and improve dentry revalidation Message-ID: <20190317203822.GH2217@ZenIV.linux.org.uk> References: <20190317200444.5967-1-ebiggers@kernel.org> <20190317200444.5967-2-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190317200444.5967-2-ebiggers@kernel.org> Sender: Al Viro To: Eric Biggers Cc: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, linux-unionfs@vger.kernel.org, Sarthak Kukreti , Gao Xiang List-ID: On Sun, Mar 17, 2019 at 01:04:40PM -0700, Eric Biggers wrote: > + /* > + * Ciphertext name; valid if the directory's key is still unavailable. > + * > + * Note: since fscrypt forbids rename() on ciphertext names, it should > + * be safe to access ->d_parent directly here. No, it is not. Again, d_splice_alias() on buggered fs image picking a reference to your subdirectory when doing a lookup elsewhere. It can relocate the damn thing, without rename() being allowed for _anything_.