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:   Mon, 18 Sep 2023 16:51:10 +0200
From:   Jan Kara <jack@...e.cz>
To:     Wang Jianjian <wangjianjian0@...mail.com>
Cc:     linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: Fix incorrect offset

On Thu 24-08-23 23:23:24, Wang Jianjian wrote:
> The last argumen of ext4_check_dir_entry is dentry offset
           ^^^ argument

> int the file.
  ^^ in the directory

Maybe you could also add to the changelog: Luckily this error only results
in the wrong offset being printed in the eventual error message.
 
> Signed-off-by: Wang Jianjian <wangjianjian0@...mail.com>

Otherwise the fix looks good. Feel free to add:

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

								Honza

> ---
>  fs/ext4/namei.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index 94608b7df7e8..33ebd35025bf 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -2261,8 +2261,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
>  	top = data2 + len;
>  	while ((char *)(de2 = ext4_next_entry(de, blocksize)) < top) {
>  		if (ext4_check_dir_entry(dir, NULL, de, bh2, data2, len,
> -					 (data2 + (blocksize - csum_size) -
> -					  (char *) de))) {
> +					(char *)de - data2)) {
>  			brelse(bh2);
>  			brelse(bh);
>  			return -EFSCORRUPTED;
> -- 
> 2.34.3
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ