]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/45[34]: add colored emoji variants to unicode tests
authorDarrick J. Wong <djwong@kernel.org>
Fri, 21 Mar 2025 21:27:23 +0000 (14:27 -0700)
committerZorro Lang <zlang@kernel.org>
Fri, 28 Mar 2025 01:05:05 +0000 (09:05 +0800)
commit5efe0accdc55a9680c4189e44be2b33ddcadae5d
tree60dbc9e100161316086ab0a73d14dcacfbf717f8
parent3e73e52ad931b32542fddbe7e9ded51e77b2a6ac
generic/45[34]: add colored emoji variants to unicode tests

Ted told me this morning about a recent problem with kernel Unicode name
casefolding vs. emoji -- initially, someone decided that zero-width
joiners should be stripped out of filenames during comparisons, which
lead to malicious git pulls of branches containing "<zwj>.git/config"
files overwriting git repo config files.  A quick fix was to stop
ignoring the "ignorable" code points, but that broke emoji in filenames,
because emoji use zero-width joiners to combine simpler emoji into more
complex ones, or alter skin tones, or colors, etc.  Reportedly the
casefolding code will also fold a red heart into a black one.

So.  To our filename support test, let's add various colors of heart
emoji and various skin tones of heart-hands; and compound emoji
consisting of multiple emoji glued together with zero width joiners.
This actually caused a buffer overflow in the string-escaping functions
of xfs_scrub phase 5 because I hadn't anticipated that we'd end up with
a filename consisting *entirely* of nonprinting bytes.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/453
tests/generic/454