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:	Tue, 12 Apr 2016 23:33:03 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Jaegeuk Kim <jaegeuk@...nel.org>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH 1/3] fscrypto: use dget_parent() in fscrypt_d_revalidate()

On Tue, Apr 12, 2016 at 10:27:20AM -0700, Jaegeuk Kim wrote:
> This patch updates fscrypto along with the below ext4 crypto change.
> 
> Fixes: 3d43bcfef5f0 ("ext4 crypto: use dget_parent() in ext4_d_revalidate()")

>  static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags)
>  {
> -	struct inode *dir = d_inode(dentry->d_parent);
> -	struct fscrypt_info *ci = dir->i_crypt_info;
> +	struct dentry *dir;
> +	struct fscrypt_info *ci;
>  	int dir_has_key, cached_with_key;
>  
> -	if (!dir->i_sb->s_cop->is_encrypted(dir))
> +	dir = dget_parent(dentry);
> +	if (!d_inode(dir)->i_sb->s_cop->is_encrypted(d_inode(dir))) {
> +		dput(dir);

... and as soon as you call it from RCU mode, you are screwed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ