aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds2024-01-10 16:06:58 -0800
committerLinus Torvalds2024-01-10 16:06:58 -0800
commit6bd593bc743d3b959af157698064ece5fb56aee0 (patch)
treee7459fe565e34501c6a956ef72c6aa6cd951f4ca /fs
parentacc657692aed438e9931438f8c923b2b107aebf9 (diff)
parentb837a816b36fae45f27d75d9bdeb1b5b9d16a53c (diff)
Merge tag 'unicode-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode
Pull unicode updates from Gabriel Krisman Bertazi: "Other than the update to MAINTAINERS, this PR has only a fix to stop ecryptfs from inadvertently mounting case-insensitive filesystems that it cannot handle, which would otherwise caused post-mount failures" * tag 'unicode-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode: MAINTAINERS: update unicode maintainer e-mail address ecryptfs: Reject casefold directory inodes
Diffstat (limited to 'fs')
-rw-r--r--fs/ecryptfs/inode.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index b0e8774c435a..d7193687b9b4 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -78,6 +78,14 @@ static struct inode *__ecryptfs_get_inode(struct inode *lower_inode,
if (lower_inode->i_sb != ecryptfs_superblock_to_lower(sb))
return ERR_PTR(-EXDEV);
+
+ /* Reject dealing with casefold directories. */
+ if (IS_CASEFOLDED(lower_inode)) {
+ pr_err_ratelimited("%s: Can't handle casefolded directory.\n",
+ __func__);
+ return ERR_PTR(-EREMOTE);
+ }
+
if (!igrab(lower_inode))
return ERR_PTR(-ESTALE);
inode = iget5_locked(sb, (unsigned long)lower_inode,