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] [day] [month] [year] [list]
Message-ID: <wve6u2kei6lfycbg7sogkjogd76tqoixfydop4dnhisgdcueep@uipa6akqgmuh>
Date: Fri, 7 Feb 2025 14:16:37 +0100
From: Jan Kara <jack@...e.cz>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: brauner@...nel.org, viro@...iv.linux.org.uk, jack@...e.cz, 
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] vfs: catch invalid modes in may_open()

On Thu 06-02-25 18:03:06, Mateusz Guzik wrote:
> Signed-off-by: Mateusz Guzik <mjguzik@...il.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza
> ---
>  fs/namei.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index 3ab9440c5b93..21630a0f8e30 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -3415,6 +3415,8 @@ static int may_open(struct mnt_idmap *idmap, const struct path *path,
>  		if ((acc_mode & MAY_EXEC) && path_noexec(path))
>  			return -EACCES;
>  		break;
> +	default:
> +		VFS_BUG_ON_INODE(1, inode);
>  	}
>  
>  	error = inode_permission(idmap, inode, MAY_OPEN | acc_mode);
> -- 
> 2.43.0
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ