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: <edd223sc52jmxr255onvp5qwbwoyjv5douhrwxhor5qk7m2q6c@r4uqvboctxjx>
Date: Thu, 18 Dec 2025 22:38:04 +0800
From: Heming Zhao <heming.zhao@...e.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Mark Fasheh <mark@...heh.com>, Joel Becker <jlbec@...lplan.org>, 
	Joseph Qi <joseph.qi@...ux.alibaba.com>, Andrew Morton <akpm@...ux-foundation.org>, 
	Su Yue <glass.su@...e.com>, ocfs2-devel@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] ocfs2: fix uninitialized variable in
 ocfs2_test_suballoc_bit()

On Thu, Dec 18, 2025 at 10:48:12AM +0300, Dan Carpenter wrote:
> The ocfs2_read_hint_group_descriptor() function sets "*released = 1;"
> but nothing ever sets it to zero so it's used without being
> initialized.  Initialize it to zero.
> 
> Fixes: acb8a8335a64 ("ocfs2: detect released suballocator BG for fh_to_[dentry|parent]")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>

Many thanks for catching this bug.
I will try the config CONFIG_INIT_STACK_ALL_PATTERN=y

Reviewed-by: Heming Zhao <heming.zhao@...e.com>

> ---
> These days everyone has CONFIG_INIT_STACK_ALL_ZERO enabled so we never
> detect these bugs.  There are a couple distros which don't, I've heard.
> But in testing, I always encourage people to use
> CONFIG_INIT_STACK_ALL_PATTERN=y
> 
>  fs/ocfs2/suballoc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
> index 72c7559c1a2b..79d1325b2111 100644
> --- a/fs/ocfs2/suballoc.c
> +++ b/fs/ocfs2/suballoc.c
> @@ -3163,7 +3163,7 @@ static int ocfs2_test_suballoc_bit(struct ocfs2_super *osb,
>  	struct ocfs2_group_desc *group;
>  	struct buffer_head *group_bh = NULL;
>  	u64 bg_blkno;
> -	int status, quiet = 0, released;
> +	int status, quiet = 0, released = 0;
>  
>  	trace_ocfs2_test_suballoc_bit((unsigned long long)blkno,
>  				      (unsigned int)bit);
> -- 
> 2.51.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ