e2fsprogs/e2fsck
Theodore Ts'o e5ea6b14eb e2fsck: Fix potential data corruptor bug in journal recovery
While synchronizing e2fsck's recovery.c with the latest 2.6 kernel
sources, I discovered a serious bug that apparently had been fixed in
the kernel sometime between Deceber 2003 and April 2005, but which had
not been carried over to e2fsprogs.  Specifically, when blocks whose
first 4 bytes are JFS_MAGIC_NUMBER (0xc03b3998) are written into the
journal, the first 4 bytes zero'ed out.  A one character typo meant
that when the blocks were replayed by e2fsck, the JFS_MAGIC_NUMBER
would not be restored.

Oops.

Fortunately, it is *highly* unlikely that ext4 metadata blocks will
contain that magic number in the first four bytes, and data=journalled
is a relatively rarely used.

This commit fixes this bug, as well as updating e2fsck's recovery.c to
be in sync with 2.6.25.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-05-20 14:51:14 -04:00
..
CHANGES Many files: 1997-04-26 13:21:57 +00:00
Makefile.in Fix makefile dependency issues for various install targets 2008-02-28 20:45:39 -05:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
argv_parse.c Add the profile library code to e2fsck 2005-12-30 23:57:32 -05:00
argv_parse.h Add the profile library code to e2fsck 2005-12-30 23:57:32 -05:00
badblocks.c e2fsck: Print an explicit message when the bad block inode is updated 2008-02-27 15:10:20 -05:00
dict.c Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00
dict.h Fixx gcc -Wall nitpicks. 2003-07-06 00:36:48 -04:00
dirinfo.c Fix e2fsck segfault on very badly damaged filesystems 2007-07-11 13:42:43 -04:00
dx_dirinfo.c ext2fs_getmem(), ext2fs_free_mem(), and ext2fs_resize_mem() 2003-08-01 09:41:07 -04:00
e2fsck.8.in e2fsck: Support a negative argument to -C to suppress progress information 2008-03-26 08:26:01 -04:00
e2fsck.c e2fsck: Include the device name in the progress information 2008-03-26 09:11:46 -04:00
e2fsck.conf.5.in Work around lame Ubuntu init scripts / installer bugs 2007-09-22 20:43:11 -04:00
e2fsck.conf.ubuntu Add Ubuntu-specific e2fsck.conf file to work around Ubuntu issues 2007-12-05 21:01:22 -05:00
e2fsck.h e2fsck: backup superblocks if key constants have changed 2007-10-06 12:39:57 -04:00
ea_refcount.c Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00
ehandler.c Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00
emptydir.c [COVERITY] Fix missing return code check for ext2fs_write_inode 2007-03-18 11:16:33 -04:00
extend.c ChangeLog, extend.c, flushb.c: 2000-09-12 21:24:36 +00:00
flushb.c Remove the debian-special legal permission notes. 2003-04-14 20:40:49 -04:00
iscan.c Fix signed vs unsigned printf format strings for block and inode numbers 2006-09-12 14:56:15 -04:00
jfs_user.h e2fsck: Fix potential data corruptor bug in journal recovery 2008-05-20 14:51:14 -04:00
journal.c e2fsck: update the backup superblocks if the feature bitmasks are changed 2007-10-06 12:39:57 -04:00
message.c e2fsck: Detect recursive loops in @-expansions 2007-07-02 19:04:31 -04:00
mtrace.awk Many files: 1997-04-26 13:21:57 +00:00
mtrace.c ChangeLog, mtrace.c, mtrace.h: 2000-12-31 01:52:03 +00:00
mtrace.h ChangeLog, super.c: 2001-01-12 21:05:57 +00:00
pass1.c e2fsck: Fix directory i_size handling 2008-03-13 00:58:54 -04:00
pass1b.c e2fsck: Fix obvious typo in an "internal error" message 2008-03-12 12:12:50 -04:00
pass2.c e2fsck: Handle a pass 2 "should never happen" error gracefully 2008-03-12 16:10:48 -04:00
pass3.c Rework e2fsck's dirinfo abstraction to be more friendly for databases 2007-04-04 22:33:31 -04:00
pass4.c [COVERITY] Fix (error case only) memory leak in e2fsck pass #4 2007-03-28 12:43:05 -04:00
pass5.c [COVERITY] Fix (error case only) memory leak in e2fsck pass #5 2007-03-28 12:07:41 -04:00
problem.c e2fsck: Use "Clear Htree" instead of "Clear" when the Htree is corrupt 2008-03-13 10:44:54 -04:00
problem.h e2fsck: Handle a pass 2 "should never happen" error gracefully 2008-03-12 16:10:48 -04:00
problemP.h Add e2fsck problem handling to be configurable 2005-12-31 16:33:33 -05:00
prof_err.et Add the profile library code to e2fsck 2005-12-30 23:57:32 -05:00
profile.c Add new function: profile_set_default() 2007-07-04 13:03:35 -04:00
profile.h Add new function: profile_set_default() 2007-07-04 13:03:35 -04:00
profile_helpers.c Fix gcc -Wall warning in profile_helper.c 2006-01-05 01:29:50 -05:00
profile_helpers.h Simplify profile core functionality 2006-01-02 22:04:41 -05:00
recovery.c e2fsck: Fix potential data corruptor bug in journal recovery 2008-05-20 14:51:14 -04:00
region.c This patch completes the initial extended attribute/ACL support for 2001-07-19 16:31:25 -04:00
rehash.c e2fsck: When optimizing non-htree directories, sort by inode number 2008-01-01 10:59:57 -05:00
revoke.c Fix gcc -Wall nits. 2002-10-13 23:56:28 -04:00
scantest.c Add Apple/Darwin patches. 2003-03-14 02:13:48 -05:00
super.c Ignore "safe" flag differences when e2fsck compares superblocks 2008-01-26 23:17:50 -05:00
swapfs.c Convert use of ext2fs_get_mem to ext2fs_get_array for overflow detection 2007-12-27 10:08:13 -05:00
unix.c e2fsck: avoid double free of ctx->filesystem_name 2008-04-07 12:29:03 -04:00
util.c e2fsck: Add blocksize sanity check when finding a backup superblock 2007-05-31 11:56:17 -04:00