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  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, 12 Jun 2018 11:53:27 +0200
From:   Jan Kara <jack@...e.cz>
To:     <linux-ext4@...r.kernel.org>
Cc:     Ted Tso <tytso@....edu>, Jan Kara <jack@...e.cz>
Subject: [PATCH 09/10] ext2fs: Don't check s_inodes_count with EXT2_FLAG_IGNORE_SB_ERRORS

Don't verify s_inodes_count is correct with EXT2_FLAG_IGNORE_SB_ERRORS
flag set. This allows e2fsck and debugfs to fix this value.

Reviewed-by: Andreas Dilger <adilger@...ger.ca>
Signed-off-by: Jan Kara <jack@...e.cz>
---
 lib/ext2fs/openfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
index e9ad0cd1a2c6..d046b2517505 100644
--- a/lib/ext2fs/openfs.c
+++ b/lib/ext2fs/openfs.c
@@ -386,7 +386,8 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
 		goto cleanup;
 	}
 	fs->group_desc_count = 	groups_cnt;
-	if ((__u64)fs->group_desc_count * EXT2_INODES_PER_GROUP(fs->super) !=
+	if (!(flags & EXT2_FLAG_IGNORE_SB_ERRORS) &&
+	    (__u64)fs->group_desc_count * EXT2_INODES_PER_GROUP(fs->super) !=
 	    fs->super->s_inodes_count) {
 		retval = EXT2_ET_CORRUPT_SUPERBLOCK;
 		goto cleanup;
-- 
2.13.7

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ