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]
Message-ID: <174786678799.1385354.14854510405696168481.stgit@frogsfrogsfrogs>
Date: Wed, 21 May 2025 15:46:41 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 06/10] fuse2fs: check for recorded fs errors before touching
 things

From: Darrick J. Wong <djwong@...nel.org>

Refuse the mount if there are errors recorded in the superblock.
We should not be trying to replay the journal on damaged filesystems.

Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
 misc/fuse2fs.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)


diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 364d26a4e0e00e..7c61c470723a88 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -755,6 +755,12 @@ static errcode_t check_fs_supported(struct fuse2fs *ff)
 		return EXT2_ET_UNSUPP_FEATURE;
 	}
 
+	if (fs->super->s_state & EXT2_ERROR_FS) {
+		err_printf(ff, "%s\n",
+ _("Errors detected; running e2fsck is required."));
+		return EXT2_ET_FILESYSTEM_CORRUPTED;
+	}
+
 	return 0;
 }
 
@@ -831,12 +837,6 @@ _("Mounting read-only without recovering journal."));
 		err_printf(ff, "%s\n",
  _("Orphans detected; running e2fsck is recommended."));
 
-	if (fs->super->s_state & EXT2_ERROR_FS) {
-		err_printf(ff, "%s\n",
- _("Errors detected; running e2fsck is required."));
-		return EXT2_ET_FILESYSTEM_CORRUPTED;
-	}
-
 	return 0;
 }
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ