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] [day] [month] [year] [list]
Date:   Wed, 28 Mar 2018 20:45:22 -0500
From:   Tyler Hicks <tyhicks@...onical.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     ecryptfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ecryptfs: lookup: Don't check if mount_crypt_stat is NULL

On 01/18/2018 08:40 PM, Guenter Roeck wrote:
> mount_crypt_stat is assigned to
> &ecryptfs_superblock_to_private(ecryptfs_dentry->d_sb)->mount_crypt_stat,
> and mount_crypt_stat is not the first object in struct ecryptfs_sb_info.
> mount_crypt_stat is therefore never NULL. At the same time, no crash
> in ecryptfs_lookup() has been reported, and the lookup functions in
> other file systems don't check if d_sb is NULL either.
> Given that, remove the NULL check.
> 
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>

Thanks! I think this change is fine. I'll get it queued up.

Tyler

> ---
>  fs/ecryptfs/inode.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
> index 847904aa63a9..97d17eaeba07 100644
> --- a/fs/ecryptfs/inode.c
> +++ b/fs/ecryptfs/inode.c
> @@ -395,8 +395,7 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode,
>  
>  	mount_crypt_stat = &ecryptfs_superblock_to_private(
>  				ecryptfs_dentry->d_sb)->mount_crypt_stat;
> -	if (mount_crypt_stat
> -	    && (mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES)) {
> +	if (mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES) {
>  		rc = ecryptfs_encrypt_and_encode_filename(
>  			&encrypted_and_encoded_name, &len,
>  			mount_crypt_stat, name, len);
> 




Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ