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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 31 Aug 2019 18:32:28 +0800
From:   Chao Yu <yuchao0@...wei.com>
To:     <tytso@....edu>, <adilger.kernel@...ger.ca>, <ebiggers@...nel.org>
CC:     Chao Yu <chao@...nel.org>, <linux-ext4@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-fscrypt@...r.kernel.org>
Subject: Re: [PATCH] ext4 crypto: fix to check feature status before get
 policy

Hi,

Is this change not necessary? A month has passed...

Thanks,

On 2019/8/4 17:56, Chao Yu wrote:
> From: Chao Yu <yuchao0@...wei.com>
> 
> When getting fscrypto policy via EXT4_IOC_GET_ENCRYPTION_POLICY, if
> encryption feature is off, it's better to return EOPNOTSUPP instead
> of ENODATA, so let's add ext4_has_feature_encrypt() to do the check
> for that.
> 
> Signed-off-by: Chao Yu <yuchao0@...wei.com>
> ---
>  fs/ext4/ioctl.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
> index 442f7ef873fc..bf87835c1237 100644
> --- a/fs/ext4/ioctl.c
> +++ b/fs/ext4/ioctl.c
> @@ -1112,9 +1112,11 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>  		return -EOPNOTSUPP;
>  #endif
>  	}
> -	case EXT4_IOC_GET_ENCRYPTION_POLICY:
> +	case EXT4_IOC_GET_ENCRYPTION_POLICY: {
> +		if (!ext4_has_feature_encrypt(sb))
> +			return -EOPNOTSUPP;
>  		return fscrypt_ioctl_get_policy(filp, (void __user *)arg);
> -
> +	}
>  	case EXT4_IOC_FSGETXATTR:
>  	{
>  		struct fsxattr fa;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ