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, 19 Jun 2018 11:25:35 -0400
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Jan Kara <jack@...e.cz>
Cc:     linux-ext4@...r.kernel.org
Subject: Re: [PATCH 06/10] e2fsck: Handle s_inodes_count corruption properly

On Tue, Jun 12, 2018 at 11:53:24AM +0200, Jan Kara wrote:
> When s_inodes_count would overflow given number of groups and inodes per
> group, we cannot currently fix the breakage in e2fsck as that requires
> trimming number of groups or inodes per group which both means data &
> inode migration etc. Just trimming sb->s_inodes_count is not enough as
> kernel's inode allocation code is not able to handle filesystems where
> not all inodes in the last group are usable. So don't pretend we can fix
> s_inodes_count overflow by just trimming the s_inodes_count value.
> 
> When s_inodes_count is just wrong but will not overflow, let's fix it.
> Also move this check before we use s_inodes_count for checking
> s_first_ino.
> 
> Signed-off-by: Jan Kara <jack@...e.cz>

Applied with the following fix-up patch.  (The entries in the problem
array must be in problem_code sort order.)

					- Ted

diff --git a/e2fsck/problem.c b/e2fsck/problem.c
index 8de558edc..efe98c920 100644
--- a/e2fsck/problem.c
+++ b/e2fsck/problem.c
@@ -184,11 +184,6 @@ static struct e2fsck_problem problem_table[] = {
 	  N_("@i count in @S is %i, @s %j.\n"),
 	  PROMPT_FIX, 0 },
 
-	/* Too many inodes in the filesystem */
-	{ PR_0_INODE_COUNT_BIG,
-	  N_("@S would have too many inodes (%N).\n"),
-	  PROMPT_NONE, PR_AFTER_CODE, PR_0_SB_CORRUPT },
-
 	{ PR_0_HURD_CLEAR_FILETYPE,
 	  N_("The Hurd does not support the filetype feature.\n"),
 	  PROMPT_CLEAR, 0 },
@@ -498,6 +493,11 @@ static struct e2fsck_problem problem_table[] = {
 	  N_("Invalid %U @q @i %i.  "),
 	  PROMPT_FIX, 0 },
 
+	/* Too many inodes in the filesystem */
+	{ PR_0_INODE_COUNT_BIG,
+	  N_("@S would have too many inodes (%N).\n"),
+	  PROMPT_NONE, PR_AFTER_CODE, PR_0_SB_CORRUPT },
+
 	/* Pass 1 errors */
 
 	/* Pass 1: Checking inodes, blocks, and sizes */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ