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: <j2sx5unznfhswob6iuzeh5fp6tirxrbktdxkeednh7p7lfbemv@2ywasorzlvg3>
Date: Fri, 27 Jun 2025 12:00:32 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Bharadwaj Raju <bharadwaj.raju777@...il.com>
Cc: linux-bcachefs@...r.kernel.org, shuah@...nel.org, 
	linux-kernel@...r.kernel.org, linux-kernel-mentees@...ts.linux.dev, 
	syzbot+029d1989099aa5ae3e89@...kaller.appspotmail.com
Subject: Re: [PATCH] bcachefs: use mustfix to check invalid btree IDs

On Fri, Jun 27, 2025 at 02:10:32PM +0530, Bharadwaj Raju wrote:
> Checking for invalid IDs was introduced in 9e7cfb35e266 ("bcachefs: Check for invalid btree IDs")
> to prevent an invalid shift later, but since 141526548052 ("bcachefs: Bad btree roots are now autofix")
> made the parent class btree_root_bkey_invalid FSCK_AUTOFIX, fsck_err_on
> no longer works for this check.
> 
> Change the condition to use mustfix_fsck_err_on instead.

We can mark this one autofix instead

> 
> Reported-by: syzbot+029d1989099aa5ae3e89@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=029d1989099aa5ae3e89
> Fixes: 141526548052 ("bcachefs: Bad btree roots are now autofix")
> 
> Signed-off-by: Bharadwaj Raju <bharadwaj.raju777@...il.com>
> ---
>  fs/bcachefs/recovery.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
> index d0b7e3a36a54..abcaa0e3e2e6 100644
> --- a/fs/bcachefs/recovery.c
> +++ b/fs/bcachefs/recovery.c
> @@ -489,7 +489,7 @@ static int journal_replay_entry_early(struct bch_fs *c,
>  		if (unlikely(!entry->u64s))
>  			return 0;
>  
> -		if (fsck_err_on(entry->btree_id >= BTREE_ID_NR_MAX,
> +		if (mustfix_fsck_err_on(entry->btree_id >= BTREE_ID_NR_MAX,
>  				c, invalid_btree_id,
>  				"invalid btree id %u (max %u)",
>  				entry->btree_id, BTREE_ID_NR_MAX))
> -- 
> 2.50.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ