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]
Message-ID: <20240902225511.757831-4-andrealmeid@igalia.com>
Date: Mon,  2 Sep 2024 19:55:05 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Hugh Dickins <hughd@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Christian Brauner <brauner@...nel.org>,
	Jan Kara <jack@...e.cz>,
	krisman@...nel.org
Cc: linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org,
	kernel-dev@...lia.com,
	Daniel Rosenberg <drosen@...gle.com>,
	smcv@...labora.com,
	Christoph Hellwig <hch@....de>,
	André Almeida <andrealmeid@...lia.com>,
	Gabriel Krisman Bertazi <gabriel@...sman.be>
Subject: [PATCH v2 3/8] ext4: Use utf8_check_strict_name helper

Use the helper function to check the requeriments for casefold
directories using strict enconding.

Suggested-by: Gabriel Krisman Bertazi <gabriel@...sman.be>
Signed-off-by: André Almeida <andrealmeid@...lia.com>
---
 fs/ext4/namei.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 6a95713f9193..067face4dc41 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2394,8 +2394,7 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry,
 		return -ENOKEY;
 
 #if IS_ENABLED(CONFIG_UNICODE)
-	if (sb_has_strict_encoding(sb) && IS_CASEFOLDED(dir) &&
-	    utf8_validate(sb->s_encoding, &dentry->d_name))
+	if (!utf8_check_strict_name(dir, &dentry->d_name))
 		return -EINVAL;
 #endif
 
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ