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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Aug 2009 22:44:19 -0400
From:	Theodore Tso <tytso@....edu>
To:	Marcin Miroslaw <spam_trap@...ekcja.mejor.pl>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: fsck.ext4 -D corrupts fs?

On Wed, Aug 19, 2009 at 10:13:14PM +0200, Marcin Miroslaw wrote:
> Hello,
> I've noticed fs curruption after using fsck.ext4 -D

Yeah, I really should get a new release of e2fsprogs out.  It's fixed
in the maint branch.

					- Ted

commit 16e470e65010ba3f0516cf9cdf1bd6c98f064e3f
Author: Theodore Ts'o <tytso@....edu>
Date:   Sun Jul 19 22:43:33 2009 -0400

    libext2fs: Fix regression in ext2fs_extent_set_bmap()
    
    Commit 0dc291611 introduced a regression when unmapping the first
    block in an extent.  This caused e2fsck -fD to corrupt large
    directories if the directory has to shrink by more than one block.
    The problem was set_bmap should only go to a next leaf when setting a
    first block in an extent, and not when it is unmapping the first block
    in an extent.
    
    Addresses-Debian-Bug: #537510
    
    Signed-off-by: "Theodore Ts'o" <tytso@....edu>

diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c
index 7fcc2cf..9d7b7de 100644
--- a/lib/ext2fs/extent.c
+++ b/lib/ext2fs/extent.c
@@ -1296,11 +1296,12 @@ errcode_t ext2fs_extent_set_bmap(ext2_extent_handle_t handle,
 			}
 			if (retval)
 				goto done;
+			retval = ext2fs_extent_get(handle,
+						   EXT2_EXTENT_NEXT_LEAF,
+						   &extent);
+			if (retval)
+				goto done;
 		}
-		retval = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT_LEAF,
-					   &extent);
-		if (retval)
-			goto done;
 		extent.e_pblk++;
 		extent.e_lblk++;
 		extent.e_len--;
--
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