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: <1520594882-21867-1-git-send-email-lczerner@redhat.com>
Date:   Fri,  9 Mar 2018 12:28:02 +0100
From:   Lukas Czerner <lczerner@...hat.com>
To:     tytso@....edu
Cc:     linux-ext4@...r.kernel.org, Lukas Czerner <lczerner@...hat.com>
Subject: [PATCH] e2fsck: fix endianness problem when reading htree nodes

Wrong directory block number can be saved in ->previous on big endian
system in parse_int_node(). Fix it by moving the mask out of the endian
conversion.

Fixes: ae9efd05a986 ("e2fsck: 3 level hash tree directory optimization")
Signed-off-by: Lukas Czerner <lczerner@...hat.com>
---
 e2fsck/pass2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index 1b0504c..345b29e 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -664,7 +664,7 @@ static void parse_int_node(ext2_filsys fs,
 		}
 
 		dx_db->previous =
-			i ? ext2fs_le32_to_cpu(ent[i-1].block & 0x0ffffff) : 0;
+			i ? ext2fs_le32_to_cpu(ent[i-1].block) & 0x0ffffff : 0;
 
 		if (hash < min_hash)
 			min_hash = hash;
-- 
2.7.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ