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: <2BF8E155-34A0-4913-9B81-DC6CA1A4F6E0@dilger.ca>
Date:   Tue, 10 Mar 2020 17:02:26 -0600
From:   Andreas Dilger <adilger@...ger.ca>
To:     Dmitry Monakhov <dmonakhov@...il.com>
Cc:     linux-ext4 <linux-ext4@...r.kernel.org>,
        Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH] ext4: mark block bitmap corrupted when found instead of
 BUGON

On Mar 10, 2020, at 9:01 AM, Dmitry Monakhov <dmonakhov@...il.com> wrote:
> 
> We already has similar code in ext4_mb_complex_scan_group(), but
> ext4_mb_simple_scan_group() still affected.
> 
> Other reports: https://www.spinics.net/lists/linux-ext4/msg60231.html
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@...il.com>

Reviewed-by: Andreas Dilger <adilger@...ger.ca>

> ---
> fs/ext4/mballoc.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 1027e01..97cd1a2 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -1901,8 +1901,15 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac,
> 		BUG_ON(buddy == NULL);
> 
> 		k = mb_find_next_zero_bit(buddy, max, 0);
> -		BUG_ON(k >= max);
> -
> +		if (k >= max) {
> +			ext4_grp_locked_error(ac->ac_sb, e4b->bd_group, 0, 0,
> +				"%d free clusters of order %d. But found 0",
> +				grp->bb_counters[i], i);
> +			ext4_mark_group_bitmap_corrupted(ac->ac_sb,
> +					 e4b->bd_group,
> +					EXT4_GROUP_INFO_BBITMAP_CORRUPT);
> +			break;
> +		}
> 		ac->ac_found++;
> 
> 		ac->ac_b_ex.fe_len = 1 << i;
> --
> 2.7.4
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ