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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  2 Mar 2018 16:59:22 -0800
From:   Eric Biggers <ebiggers3@...il.com>
To:     linux-ext4@...r.kernel.org
Cc:     Eric Biggers <ebiggers@...gle.com>
Subject: [PATCH 09/10] e2fsck: require that fast symlinks don't have EXT4_EXTENTS_FL

From: Eric Biggers <ebiggers@...gle.com>

It doesn't make sense for EXT4_EXTENTS_FL to be set on a fast symlink.
The kernel doesn't set it, and it ignores it if set.  Meanwhile, e2fsck
is stricter: it will try to validate the extent tree, which will almost
certainly fail (assuming the symlink is, in fact, a fast symlink).

Make this behavior more explicit by rejecting EXT4_EXTENTS_FL for fast
symlinks, rather than going ahead and trying to validate an extent tree.

Signed-off-by: Eric Biggers <ebiggers@...gle.com>
---
 e2fsck/pass1.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 46d70d14..fccd8816 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -203,9 +203,9 @@ int e2fsck_pass1_check_symlink(ext2_filsys fs, ext2_ino_t ino,
 		return 1;
 	}
 
-	if (ext2fs_is_fast_symlink(inode) &&
-	    !(inode->i_flags & EXT4_EXTENTS_FL)) {
-
+	if (ext2fs_is_fast_symlink(inode)) {
+		if (inode->i_flags & EXT4_EXTENTS_FL)
+			return 0;
 		buf = (char *)inode->i_block;
 		buflen = sizeof(inode->i_block);
 	} else {
-- 
2.16.2.395.g2e18187dfd-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ