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:	Thu, 15 Nov 2012 16:13:23 +0800
From:	Zheng Liu <gnehzuil.liu@...il.com>
To:	linux-ext4@...r.kernel.org, tytso@....edu
Cc:	Zheng Liu <wenqing.lz@...bao.com>
Subject: [PATCH 1/7] libext2fs: rec_len is set incorrect in ext2fs_process_dir_inline_data

From: Zheng Liu <wenqing.lz@...bao.com>

A new dir doesn't be created in the parent dir with inline data due to this
bug because rec_len is set incorrect.  It will cause a wrong offset, and no
free room can be found.

Signed-off-by: Zheng Liu <wenqing.lz@...bao.com>
---
 lib/ext2fs/dir_iterate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/ext2fs/dir_iterate.c b/lib/ext2fs/dir_iterate.c
index 3f94ad4..198c5aa 100644
--- a/lib/ext2fs/dir_iterate.c
+++ b/lib/ext2fs/dir_iterate.c
@@ -335,7 +335,8 @@ int ext2fs_process_dir_inline_data(ext2_filsys	fs,
 			entry++;
 
 		if (ret & DIRENT_CHANGED) {
-			dirent->rec_len = rec_len;
+			if (ext2fs_get_rec_len(fs, dirent, &rec_len))
+				return BLOCK_ABORT;
 			changed++;
 		}
 		if (ret & DIRENT_ABORT) {
-- 
1.7.12.rc2.18.g61b472e

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