Re: [syzbot] Re: [syzbot] [fscrypt?] WARNING in fscrypt_fname_siphash
From: syzbot
Date: Thu May 30 2024 - 02:32:44 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.
***
Subject: Re: [syzbot] [fscrypt?] WARNING in fscrypt_fname_siphash
Author: lizhi.xu@xxxxxxxxxxxxx
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 74eca356f6d4
diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c
index deabe29da7fb..c8840cfc01dd 100644
--- a/fs/ext4/hash.c
+++ b/fs/ext4/hash.c
@@ -265,6 +265,10 @@ static int __ext4fs_dirhash(const struct inode *dir, const char *name, int len,
__u64 combined_hash;
if (fscrypt_has_encryption_key(dir)) {
+ if (!IS_CASEFOLDED(dir)) {
+ ext4_warning_inode(dir, "Siphash requires Casefolded file");
+ return -2;
+ }
combined_hash = fscrypt_fname_siphash(dir, &qname);
} else {
ext4_warning_inode(dir, "Siphash requires key");