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: <1460769225-31398-4-git-send-email-tytso@mit.edu>
Date:	Fri, 15 Apr 2016 21:13:45 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc:	Theodore Ts'o <tytso@....edu>
Subject: [PATCH 4/4] e2fsck: don't abort if the journal is corrupted due to checksum errors

If e2fsck_run_ext3_journal() returns an error indicating that a CRC
error was detected, we shouldn't abort, but instead proceed so the
file system can be fixed.

Signed-off-by: Theodore Ts'o <tytso@....edu>
---
 e2fsck/unix.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 959b4dd..cfd33e4 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -53,6 +53,7 @@ extern int optind;
 #include "support/plausible.h"
 #include "e2fsck.h"
 #include "problem.h"
+#include "jfs_user.h"
 #include "../version.h"
 
 /* Command line options */
@@ -1645,7 +1646,7 @@ failure:
 		retval = e2fsck_check_ext3_journal(ctx);
 		if (retval) {
 			com_err(ctx->program_name, retval,
-				_("while checking ext3 journal for %s"),
+				_("while checking journal for %s"),
 				ctx->device_name);
 			fatal_error(ctx, 0);
 		}
@@ -1677,9 +1678,10 @@ failure:
 			retval = e2fsck_run_ext3_journal(ctx);
 			if (retval) {
 				com_err(ctx->program_name, retval,
-				_("while recovering ext3 journal of %s"),
+				_("while recovering journal of %s"),
 					ctx->device_name);
-				fatal_error(ctx, 0);
+				if ((retval != EFSBADCRC) && (retval != EFSCORRUPTED))
+					fatal_error(ctx, 0);
 			}
 			ext2fs_close_free(&ctx->fs);
 			ctx->flags |= E2F_FLAG_RESTARTED;
-- 
2.5.0

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