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: <CAGXu5jJbLu5C+T7D8n=SNJOkG-VTqw7wD8RAmyLg+T__XQmfnA@mail.gmail.com>
Date:	Thu, 7 Jun 2012 10:12:35 -0700
From:	Kees Cook <keescook@...omium.org>
To:	"Theodore Ts'o" <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>,
	stable@...nel.org, Sander Eikelenboom <linux@...elenboom.it>
Subject: Re: [PATCH] ext4: fix the free blocks calculation for ext3 file
 systems w/ uninit_bg

On Thu, Jun 7, 2012 at 6:52 AM, Theodore Ts'o <tytso@....edu> wrote:
> Ext3 filesystems that are converted to use as many ext4 file system
> features as possible will enable uninit_bg to speed up e2fsck times.
> These file systems will have a native ext3 layout of inode tables and
> block allocation bitmaps (as opposed to ext4's flex_bg layout).
> Unfortunately, in these cases, when first allocating a block in an
> uninitialized block group, ext4 would incorrectly calculate the number
> of free blocks in that block group, and then errorneously report that
> the file system was corrupt:
>
> EXT4-fs error (device vdd): ext4_mb_generate_buddy:741: group 30, 32254 clusters in bitmap, 32258 in gd
>
> This problem can be reproduced via:
>
>    mke2fs -q -t ext4 -O ^flex_bg /dev/vdd 5g
>    mount -t ext4 /dev/vdd /mnt
>    fallocate -l 4600m /mnt/test
>
> The problem was caused by a bone headed mistake in the check to see if a
> particular metadata block was part of the block group.
>
> Many thanks to Kees Cook for finding and bisecting the buggy commit
> which introduced this bug (commit fd034a84e1, present since v3.2).
>
> Reported-by: Sander Eikelenboom <linux@...elenboom.it>
> Reported-by: Kees Cook <keescook@...omium.org>
> Signed-off-by: "Theodore Ts'o" <tytso@....edu>
> Cc: stable@...nel.org
> Cc: Sander Eikelenboom <linux@...elenboom.it>
> Cc: Kees Cook <keescook@...omium.org>

Tested-by: Kees Cook <keescook@...omium.org>

Thanks! I can confirm that this fixes it.

-Kees

-- 
Kees Cook
Chrome OS Security
--
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