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:	Tue, 01 Sep 2009 23:59:53 -0600
From:	Andreas Dilger <adilger@....com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	ext4 development <linux-ext4@...r.kernel.org>,
	"Theodore Ts'o" <tytso@....edu>
Subject: Re: [PATCH] libext2fs: use ext2fs_blocks_count() in ext2fs_open2()

On Sep 01, 2009  16:43 -0500, Eric Sandeen wrote:
> ext2fs_open2() was only looking at s_blocks_count, and
> when it wrapped to a low number, it was failing the test of:
> 
>   fs->super->s_first_data_block >= fs->super->s_blocks_count
> 
> which made the superblock look corrupt.

Is this the source of the "e2fsck is finding bad checksums" problem?

> Patch is against the pu branch
> 
> Index: e2fsprogs/lib/ext2fs/openfs.c
> ===================================================================
> --- e2fsprogs.orig/lib/ext2fs/openfs.c
> +++ e2fsprogs/lib/ext2fs/openfs.c
> @@ -288,7 +288,7 @@ errcode_t ext2fs_open2(const char *name,
>  	    blocks_per_group > EXT2_MAX_BLOCKS_PER_GROUP(fs->super) ||
>  	    fs->inode_blocks_per_group > EXT2_MAX_INODES_PER_GROUP(fs->super) ||
>             EXT2_DESC_PER_BLOCK(fs->super) == 0 ||
> -           fs->super->s_first_data_block >= fs->super->s_blocks_count) {
> +           fs->super->s_first_data_block >= ext2fs_blocks_count(fs->super)) {

I would strongly suggest to replace the declaration of "s_blocks_count"
with "s_blocks_count_lo" (and similar for every other split value), so
that we catch all instances of this type of bug.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of 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