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>] [day] [month] [year] [list]
Date:   Mon, 28 Aug 2023 12:17:00 +0200
From:   Jan Kara <jack@...e.cz>
To:     Edward AD <eadavis@...a.com>
Cc:     syzbot+b3123e6d9842e526de39@...kaller.appspotmail.com,
        adilger.kernel@...ger.ca, jack@...e.cz, linux-ext4@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, nathan@...nel.org, ndesaulniers@...gle.com,
        syzkaller-bugs@...glegroups.com, trix@...hat.com, tytso@....edu,
        yi.zhang@...wei.com
Subject: Re: [PATCH] ext4: fix ext4_calculate_overhead use invliad j_inode

On Sat 26-08-23 11:55:54, Edward AD wrote:
> In ext4_calculate_overhead(), ext4_get_journal_inode() returned an invalid inode 
> pointer without processing. Here, an invalid pointer judgment condition is added 
> to avoid incorrect operation of invalid pointer j_inode.
> 
> Reported-by: syzbot+b3123e6d9842e526de39@...kaller.appspotmail.com
> Fixes: 99d6c5d892bf ("ext4: ext4_get_{dev}_journal return proper error value")
> Signed-off-by: Edward AD <eadavis@...a.com>

Thanks for the fixup but Ted has already merged the fixup from Zhang Yi [1].

								Honza

[1] https://lore.kernel.org/all/20230826011029.2023140-1-yi.zhang@huaweicloud.com


> ---
>  fs/ext4/super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 34f5406c08da..0dac00954d25 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4178,7 +4178,7 @@ int ext4_calculate_overhead(struct super_block *sb)
>  	else if (ext4_has_feature_journal(sb) && !sbi->s_journal && j_inum) {
>  		/* j_inum for internal journal is non-zero */
>  		j_inode = ext4_get_journal_inode(sb, j_inum);
> -		if (j_inode) {
> +		if (j_inode && !IS_ERR(j_inode)) {
>  			j_blocks = j_inode->i_size >> sb->s_blocksize_bits;
>  			overhead += EXT4_NUM_B2C(sbi, j_blocks);
>  			iput(j_inode);
> -- 
> 2.25.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ