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]
Date:	Sun, 28 Mar 2010 09:14:07 -0600
From:	Andreas Dilger <andreas.dilger@...cle.com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	ext4 development <linux-ext4@...r.kernel.org>,
	Alessandro Polverini <alex@...bles.it>,
	Christoph Biedl <bugzilla.kernel.bpeb@...chmal.in-ulm.de>
Subject: Re: [PATCH] resize: check s_log_groups_per_flex before accessing flex
 groups

On 2010-03-27, at 13:32, Eric Sandeen wrote:
> #13549, Kernel oops while online resizing of an ext4 filesystem
>
> if groups_per_flex < 2, sbi->s_flex_groups[] doesn't get filled out,
> and every other access to this first tests s_log_groups_per_flex;
> same thing needs to happen in resize or we'll wander off into
> a null pointer.

Does it even make sense to set INCOMPAT_FLEX_BG if we only have a  
single group per flexbg?  That is just a normal filesystem then.  That  
would be a separate bug in mke2fs.

> Reported-by: Alessandro Polverini <alex@...bles.it>
> Test-case-by: Christoph Biedl  <bugzilla.kernel.bpeb@...chmal.in-ulm.de 
> >
> Signed-off-by: Eric Sandeen <sandeen@...hat.com>
> ---
>
> Index: linux-2.6/fs/ext4/resize.c
> ===================================================================
> --- linux-2.6.orig/fs/ext4/resize.c
> +++ linux-2.6/fs/ext4/resize.c
> @@ -930,7 +930,8 @@ int ext4_group_add(struct super_block *s
> 	percpu_counter_add(&sbi->s_freeinodes_counter,
> 			   EXT4_INODES_PER_GROUP(sb));
>
> -	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
> +	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG) &&
> +	    sbi->s_log_groups_per_flex) {
> 		ext4_group_t flex_group;
> 		flex_group = ext4_flex_group(sbi, input->group);
> 		atomic_add(input->free_blocks_count,
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux- 
> ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cheers, Andreas
--
Andreas Dilger
Principal Engineer, Lustre Group
Oracle Corporation Canada Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ