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: <20250413045718.150126-1-kevinpaul468@gmail.com>
Date: Sun, 13 Apr 2025 10:27:18 +0530
From: Kevin Paul Reddy Janagari <kevinpaul468@...il.com>
To: tytso@....edu,
	adilger.kernel@...ger.ca,
	linux-ext4@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: kevinpaul468@...il.com,
	skhan@...uxfoundation.org
Subject: [PATCH] ext4: filesystems without casefold feature cannot be mounted 

commit 985b67cd8639 ("ext4: filesystems without casefold feature cannot be
mounted with siphash") upstream

CONFLICT: A condition above this was wrapped in #ifdef making git not
able to merge them: Merge conflict

When mounting the ext4 filesystem, if the default hash version is set to
DX_HASH_SIPHASH but the casefold feature is not set, exit the mounting.

compile tested
Signed-off-by: Kevin Paul Reddy Janagari <kevinpaul468@...il.com>
---
 fs/ext4/super.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 541cfd118fbc..9bf073bec190 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3192,6 +3192,15 @@ int ext4_feature_set_ok(struct super_block *sb, int readonly)
 	}
 #endif
 
+	if (EXT4_SB(sb)->s_es->s_def_hash_version == DX_HASH_SIPHASH &&
+			!ext4_has_feature_casefold(sb)) {
+		ext4_msg(sb, KERN_ERR,
+				"Filesystem without casefold feature cannot be "
+				"mounted with siphash");
+		return 0;
+	}
+
+
 	if (readonly)
 		return 1;
 
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ