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:	Sun, 1 Nov 2015 16:32:35 -0800
From:	"Darrick J. Wong" <darrick.wong@...cle.com>
To:	Xu Cang <cangxumu@...il.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: crypto return correct error for file_mmap when
 get_encryption_info failed.

On Sun, Nov 01, 2015 at 05:01:37PM -0500, Xu Cang wrote:
> diff --git a/fs/ext4/file.c b/fs/ext4/file.c
> index 113837e..1c0086a 100644
> --- a/fs/ext4/file.c
> +++ b/fs/ext4/file.c
> @@ -295,7 +295,7 @@ static int ext4_file_mmap(struct file *file,
> struct vm_area_struct *vma)
>         if (ext4_encrypted_inode(inode)) {
>                 int err = ext4_get_encryption_info(inode);
>                 if (err)
> -                       return 0;
> +                       return -EACCES;

Shouldn't this return err here?

--D

>                 if (ext4_encryption_info(inode) == NULL)
>                         return -ENOKEY;
>         }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ