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-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0704101344050.29750@webb>
Date:	Tue, 10 Apr 2007 13:51:12 -0700 (PDT)
From:	Jim Garlick <garlick@...l.gov>
To:	tytso@....edu
cc:	linux-ext4@...r.kernel.org
Subject: [PATCH] e2fsprogs - pass1c terminates early if hard links

Ted,

I think this is a small buglet in e2fsck:  if a file has multiple hard 
links, e2fsck pass1c search_dirent_proc() doesn't maintain its count 
properly and may return DIRENT_ABORT before it has found containing 
directories for all inodes sharing blocks.

Signed-off-by: Jim Garlick <garlick@...l.gov>

Index: e2fsprogs+chaos/e2fsck/pass1b.c
===================================================================
--- e2fsprogs+chaos.orig/e2fsck/pass1b.c
+++ e2fsprogs+chaos/e2fsck/pass1b.c
@@ -372,8 +372,10 @@ static int search_dirent_proc(ext2_ino_t
  	if (!n)
  		return 0;
  	p = (struct dup_inode *) dnode_get(n);
-	p->dir = dir;
-	sd->count--;
+	if (!p->dir) {
+		p->dir = dir;
+		sd->count--;
+	}

  	return(sd->count ? 0 : DIRENT_ABORT);
  }
-
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