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: <20240601113749.473058-1-lizhi.xu@windriver.com>
Date: Sat, 1 Jun 2024 19:37:49 +0800
From: Lizhi Xu <lizhi.xu@...driver.com>
To: <lkp@...el.com>
CC: <coreteam@...filter.org>, <davem@...emloft.net>, <ebiggers@...nel.org>,
        <fw@...len.de>, <jaegeuk@...nel.org>, <kadlec@...filter.org>,
        <kuba@...nel.org>, <linux-fscrypt@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <lizhi.xu@...driver.com>,
        <llvm@...ts.linux.dev>, <netdev@...r.kernel.org>,
        <netfilter-devel@...r.kernel.org>, <oe-kbuild-all@...ts.linux.dev>,
        <pablo@...filter.org>,
        <syzbot+340581ba9dceb7e06fb3@...kaller.appspotmail.com>,
        <syzkaller-bugs@...glegroups.com>, <tytso@....edu>,
        <adilger.kernel@...ger.ca>, <linux-ext4@...r.kernel.org>
Subject: [PATCH V5] ext4: check hash version and filesystem casefolded consistent

When mounting the ext4 filesystem, if the hash version and casefolded are not
consistent, exit the mounting.

Reported-by: syzbot+340581ba9dceb7e06fb3@...kaller.appspotmail.com
Signed-off-by: Lizhi Xu <lizhi.xu@...driver.com>
---
 fs/ext4/super.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c682fb927b64..0ad326504c50 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5262,6 +5262,11 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
 		goto failed_mount;
 
 	ext4_hash_info_init(sb);
+	if (es->s_def_hash_version == DX_HASH_SIPHASH && 
+	    !ext4_has_feature_casefold(sb)) {
+		err = -EINVAL;
+		goto failed_mount;
+	}
 
 	err = ext4_handle_clustersize(sb);
 	if (err)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ