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] [day] [month] [year] [list]
Message-ID: <20191216170553.GA16051@quack2.suse.cz>
Date:   Mon, 16 Dec 2019 18:05:53 +0100
From:   Jan Kara <jack@...e.cz>
To:     Yunfeng Ye <yeyunfeng@...wei.com>
Cc:     akpm@...ux-foundation.org, zhengbin13@...wei.com, jack@...e.cz,
        yanaijie@...wei.com, darrick.wong@...cle.com, linux.bhar@...il.com,
        hariprasad.kelam@...il.com, deepa.kernel@...il.com,
        reiserfs-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
        "hushiyuan@...wei.com" <hushiyuan@...wei.com>,
        "linfeilong@...wei.com" <linfeilong@...wei.com>
Subject: Re: [PATCH] reiserfs: prevent NULL pointer dereference in
 reiserfs_insert_item()

On Mon 16-12-19 20:05:32, Yunfeng Ye wrote:
> The variable inode may be NULL in reiserfs_insert_item(), but there is
> no check before accessing the member of inode.
> 
> Fix this by adding NULL pointer check before calling reiserfs_debug().
> 
> Signed-off-by: Yunfeng Ye <yeyunfeng@...wei.com>

Thanks, I've added the patch to my tree.

								Honza

> ---
>  fs/reiserfs/stree.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
> index da9ebe33882b..bb4973aefbb1 100644
> --- a/fs/reiserfs/stree.c
> +++ b/fs/reiserfs/stree.c
> @@ -2246,7 +2246,8 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
>  	/* also releases the path */
>  	unfix_nodes(&s_ins_balance);
>  #ifdef REISERQUOTA_DEBUG
> -	reiserfs_debug(th->t_super, REISERFS_DEBUG_CODE,
> +	if (inode)
> +		reiserfs_debug(th->t_super, REISERFS_DEBUG_CODE,
>  		       "reiserquota insert_item(): freeing %u id=%u type=%c",
>  		       quota_bytes, inode->i_uid, head2type(ih));
>  #endif
> -- 
> 2.7.4
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ