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: <175573318728.4130038.7753543107737909252.stgit@frogsfrogsfrogs>
Date: Wed, 20 Aug 2025 16:42:42 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: [PATCH 07/12] 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.

Cc: <linux-ext4@...r.kernel.org> # v1.43
Fixes: 81cbf1ef4f5dab ("misc: add fuse2fs, a FUSE server for e2fsprogs")
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 c201f95e771b85..415f174875922f 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -4723,6 +4723,12 @@ int main(int argc, char *argv[])
 		goto out;
 	}
 
+	if (global_fs->super->s_state & EXT2_ERROR_FS) {
+		err_printf(&fctx, "%s\n",
+ _("Errors detected; running e2fsck is required."));
+		goto out;
+	}
+
 	/*
 	 * ext4 can't do COW of shared blocks, so if the feature is enabled,
 	 * we must force ro mode.
@@ -4784,12 +4790,6 @@ int main(int argc, char *argv[])
 		err_printf(&fctx, "%s\n",
  _("Orphans detected; running e2fsck is recommended."));
 
-	if (global_fs->super->s_state & EXT2_ERROR_FS) {
-		err_printf(&fctx, "%s\n",
- _("Errors detected; running e2fsck is required."));
-		goto out;
-	}
-
 	/* Clear the valid flag so that an unclean shutdown forces a fsck */
 	if (global_fs->flags & EXT2_FLAG_RW) {
 		global_fs->super->s_mnt_count++;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ