Re: [f2fs-dev] [PATCH v2 3/3] f2fs: reject casefolded names that fold to ".", "..", or empty

From: Gabriel Krisman Bertazi

Date: Tue Nov 24 2026 - 14:52:36 EST


Sarthak Kukreti via Linux-f2fs-devel
<linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx> writes:

> From: Dmitry Torokhov <dtor@xxxxxxxxxx>
>
> Filenames consisting only of ignorable Unicode characters fold to empty
> strings, and names with leading dots and ignorable characters can fold
> to "." or "..". Allowing such names in casefolded directories can corrupt
> directory structure or cause confusion with special entries.
>
> Reject any non-dot names that fold to empty, ".", or ".." during
> casefolded name setup, while still allowing invalid UTF-8 sequences to
> be handled as opaque byte sequences when strict mode is not enabled.
>
> Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups")
> Signed-off-by: Dmitry Torokhov <dtor@xxxxxxxxxx>
> Signed-off-by: Sarthak Kukreti <sarthakkukreti@xxxxxxxxxx>

I don't have any comments on this one. Fell free to add:

Reviewed-by: Gabriel Krisman Bertazi <krisman@xxxxxxx>


--
Gabriel Krisman Bertazi