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]
Date:	Tue, 27 Nov 2007 18:03:06 +0100
From:	Jan Kara <jack@...e.cz>
To:	tytso@....edu
Cc:	linux-ext4@...r.kernel.org
Subject: [PATCH] Fix bug in ext2fs_unlink

  Hi,

  the patch below fixes a bug in ext2fs_unlink() I came across when testing
my changes to e2fsprogs for 64KB blocksize support... Please apply.

									Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR

----
Subject: Fix a bug in deletion of first directory entry in a second (or further) directory block

We cannot merge a removed directory entry to just arbitrary previous directory
entry. The previous entry must be in the same block. We check whether the current
entry is not the first one in the block and only if it isn't merge it to the
previous entry. 

Signed-off-by: Jan Kara <jack@...e.cz>

diff --git a/lib/ext2fs/unlink.c b/lib/ext2fs/unlink.c
index eb6527e..d459bbd 100644
--- a/lib/ext2fs/unlink.c
+++ b/lib/ext2fs/unlink.c
@@ -31,7 +31,7 @@ struct link_struct  {
  #pragma argsused
 #endif
 static int unlink_proc(struct ext2_dir_entry *dirent,
-		     int	offset EXT2FS_ATTR((unused)),
+		     int	offset,
 		     int	blocksize EXT2FS_ATTR((unused)),
 		     char	*buf EXT2FS_ATTR((unused)),
 		     void	*priv_data)
@@ -56,7 +56,7 @@ static int unlink_proc(struct ext2_dir_e
 			return 0;
 	}
 
-	if (prev)
+	if (offset)
 		/* We actually would not need to convert initial values as
 		 * they are certainly less than 64K but let's not try to be
 		 * too clever */
-
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