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]
Message-ID: <cd010dd6-7322-3711-73f3-deae4050017a@huawei.com>
Date:   Fri, 28 Apr 2023 11:35:15 +0800
From:   Jason Yan <yanaijie@...wei.com>
To:     Theodore Ts'o <tytso@....edu>,
        Ext4 Developers List <linux-ext4@...r.kernel.org>
CC:     Andreas Dilger <adilger@...ger.ca>,
        <syzbot+bbf0f9a213c94f283a5c@...kaller.appspotmail.com>
Subject: Re: [PATCH 1/3] ext4: fix lost error code reporting in
 __ext4_fill_super()

On 2023/4/28 11:16, Theodore Ts'o wrote:
> When code was factored out of __ext4_fill_super() into
> ext4_percpu_param_init() the error return was discard.  This meant
> that it was possible for __ext4_fill_super() to return zero,
> indicating success, without the struct super getting completely filled
> in, leading to a potential NULL pointer dereference.
> 
> Reported-by: syzbot+bbf0f9a213c94f283a5c@...kaller.appspotmail.com
> Fixes: 1f79467c8a6b ("ext4: factor out ext4_percpu_param_init() ...")
> Cc: Jason Yan <yanaijie@...wei.com>
> Link: https://syzkaller.appspot.com/bug?id=6dac47d5e58af770c0055f680369586ec32e144c
> Signed-off-by: Theodore Ts'o <tytso@....edu>
> ---
>   fs/ext4/super.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 403cc0e6cd65..b11907e1fab2 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -5503,7 +5503,8 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
>   		sbi->s_journal->j_commit_callback =
>   			ext4_journal_commit_callback;
>   
> -	if (ext4_percpu_param_init(sbi))
> +	err = ext4_percpu_param_init(sbi);
> +	if (err)
>   		goto failed_mount6;
>   
>   	if (ext4_has_feature_flex_bg(sb))
> 

Reviewed-by: Jason Yan <yanaijie@...wei.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ