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: <20080711214659.GE26656@mit.edu>
Date:	Fri, 11 Jul 2008 17:46:59 -0400
From:	Theodore Tso <tytso@....edu>
To:	Manish Katiyar <mkatiyar@...il.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH] e2fsprogs : Add stricter checks for blocksize in
	ext2fs_open

This is what I ended up checking into my tree:

From: Manish Katiyar <mkatiyar@...il.com>
Date: Fri, 11 Jul 2008 17:45:07 -0400
Subject: [PATCH] libext2fs: Add stricter/earlier tests for blocksize in ext2fs_open()

Signed-off-by: "Manish Katiyar" <mkatiyar@...il.com>
Signed-off-by: "Theodore Ts'o" <tytso@....edu>
---
 lib/ext2fs/openfs.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
index fc54afe..525693e 100644
--- a/lib/ext2fs/openfs.c
+++ b/lib/ext2fs/openfs.c
@@ -232,11 +232,12 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
 		}
 	}
 	
-	fs->blocksize = EXT2_BLOCK_SIZE(fs->super);
-	if (fs->blocksize == 0) {
+	if ((fs->super->s_log_block_size + EXT2_MIN_BLOCK_LOG_SIZE) >
+	    EXT2_MAX_BLOCK_LOG_SIZE) {
 		retval = EXT2_ET_CORRUPT_SUPERBLOCK;
 		goto cleanup;
 	}
+	fs->blocksize = EXT2_BLOCK_SIZE(fs->super);
 	if (EXT2_INODE_SIZE(fs->super) < EXT2_GOOD_OLD_INODE_SIZE) {
 		retval = EXT2_ET_CORRUPT_SUPERBLOCK;
 		goto cleanup;
-- 
1.5.6.1.205.ge2c7.dirty

--
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