From: Eric Biggers <ebiggers@kernel.org>
To: Gabriel Krisman Bertazi <krisman@suse.de>
Cc: Sarthak Kukreti <sarthakkukreti@google.com>,
Theodore Ts'o <tytso@mit.edu>, Jaegeuk Kim <jaegeuk@kernel.org>,
Chao Yu <chao@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Gabriel Krisman Bertazi <krisman@collabora.co.uk>,
Dmitry Torokhov <dtor@google.com>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] libfs: reject casefolded names that fold to ".", "..", or empty
Date: Mon, 16 Nov 2026 20:05:24 +0000 [thread overview]
Message-ID: <20261116200524.GD229817@google.com> (raw)
In-Reply-To: <878q2swoxp.fsf@cartola>
On Mon, Nov 16, 2026 at 02:34:26PM -0500, Gabriel Krisman Bertazi wrote:
> Hi Sarthak,
>
> Ugh. I agree this is a problem, but I'm also trying to understand first
> the real impact beyond filesystem complaints during lookup, if any:
>
> 1. Looking up ".\u202e" folds to "." and matches the on-disk "." entry
> (de->inode == dir->i_ino) in generic_ci_match(), triggering
> EXT4_ERROR_INODE ("linked to parent dir") in ext4_lookup().
> 2. Looking up "..\u202e" folds to ".." and matches the on-disk ".."
> entry, returning -ELOOP via d_splice_alias() (or triggering
> EXT4_ERROR_INODE on the root directory).
>
> These two look like a "do stupid things, get stupid prizes" with no
> further repercussions beyond the error message. Sure, we can fix them
> to throw EINVAL, but are there bigger repercussions I'm missing?
For one: if the filesystem is mounted with errors=remount-ro or
errors=panic, then EXT4_ERROR_INODE is more than a log message.
> But the way I'd suggest be handled is by rejecting the ignorable code
> points lookup (all, but variant selectors for the reasons above), early
> in the lookup path for case-insensitive directories so they never even
> get to the filesystem. Wdyt?
If variation selectors are still allowed (e.g., "..\ufe00", that
wouldn't actually fix this bug though, right?
- Eric
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Gabriel Krisman Bertazi <krisman@suse.de>
Cc: Christian Brauner <brauner@kernel.org>,
Theodore Ts'o <tytso@mit.edu>,
Sarthak Kukreti <sarthakkukreti@google.com>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
linux-ext4@vger.kernel.org,
Gabriel Krisman Bertazi <krisman@collabora.co.uk>,
Dmitry Torokhov <dtor@google.com>
Subject: Re: [f2fs-dev] [PATCH 1/3] libfs: reject casefolded names that fold to ".", "..", or empty
Date: Mon, 16 Nov 2026 20:05:24 +0000 [thread overview]
Message-ID: <20261116200524.GD229817@google.com> (raw)
In-Reply-To: <878q2swoxp.fsf@cartola>
On Mon, Nov 16, 2026 at 02:34:26PM -0500, Gabriel Krisman Bertazi wrote:
> Hi Sarthak,
>
> Ugh. I agree this is a problem, but I'm also trying to understand first
> the real impact beyond filesystem complaints during lookup, if any:
>
> 1. Looking up ".\u202e" folds to "." and matches the on-disk "." entry
> (de->inode == dir->i_ino) in generic_ci_match(), triggering
> EXT4_ERROR_INODE ("linked to parent dir") in ext4_lookup().
> 2. Looking up "..\u202e" folds to ".." and matches the on-disk ".."
> entry, returning -ELOOP via d_splice_alias() (or triggering
> EXT4_ERROR_INODE on the root directory).
>
> These two look like a "do stupid things, get stupid prizes" with no
> further repercussions beyond the error message. Sure, we can fix them
> to throw EINVAL, but are there bigger repercussions I'm missing?
For one: if the filesystem is mounted with errors=remount-ro or
errors=panic, then EXT4_ERROR_INODE is more than a log message.
> But the way I'd suggest be handled is by rejecting the ignorable code
> points lookup (all, but variant selectors for the reasons above), early
> in the lookup path for case-insensitive directories so they never even
> get to the filesystem. Wdyt?
If variation selectors are still allowed (e.g., "..\ufe00", that
wouldn't actually fix this bug though, right?
- Eric
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2026-11-16 20:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 6:53 [PATCH 0/3] fs: reject casefolded names that fold to ".", "..", or empty Sarthak Kukreti
2026-11-13 6:53 ` [f2fs-dev] " Sarthak Kukreti via Linux-f2fs-devel
2026-11-13 6:53 ` [PATCH 1/3] libfs: " Sarthak Kukreti
2026-11-13 6:53 ` [f2fs-dev] " Sarthak Kukreti via Linux-f2fs-devel
2026-11-13 7:27 ` sashiko-bot
2026-11-13 7:27 ` sashiko-bot--- via Linux-f2fs-devel
2026-11-16 19:34 ` Gabriel Krisman Bertazi
2026-11-16 19:34 ` [f2fs-dev] " Gabriel Krisman Bertazi
2026-11-16 20:05 ` Eric Biggers [this message]
2026-11-16 20:05 ` Eric Biggers via Linux-f2fs-devel
2026-11-17 2:00 ` Theodore Tso
2026-11-17 2:00 ` [f2fs-dev] " Theodore Tso
2026-11-17 8:47 ` David Laight
2026-11-17 8:47 ` [f2fs-dev] " David Laight
2026-11-17 14:54 ` Theodore Tso
2026-11-17 14:54 ` Theodore Tso
2026-11-17 17:59 ` Al Viro
2026-11-17 17:59 ` [f2fs-dev] " Al Viro
2026-11-17 19:39 ` David Laight
2026-11-17 19:39 ` [f2fs-dev] " David Laight
2026-11-17 2:44 ` Sarthak Kukreti
2026-11-17 2:44 ` [f2fs-dev] " Sarthak Kukreti via Linux-f2fs-devel
2026-11-13 6:53 ` [PATCH 2/3] ext4: " Sarthak Kukreti
2026-11-13 6:53 ` [f2fs-dev] " Sarthak Kukreti via Linux-f2fs-devel
2026-11-13 7:04 ` sashiko-bot
2026-11-13 6:53 ` [PATCH 3/3] f2fs: " Sarthak Kukreti
2026-11-13 6:53 ` [f2fs-dev] " Sarthak Kukreti via Linux-f2fs-devel
2026-11-13 7:00 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116200524.GD229817@google.com \
--to=ebiggers@kernel.org \
--cc=brauner@kernel.org \
--cc=chao@kernel.org \
--cc=dtor@google.com \
--cc=jaegeuk@kernel.org \
--cc=krisman@collabora.co.uk \
--cc=krisman@suse.de \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sarthakkukreti@google.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.