]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: add support for surrogate pair conversion
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 18 Dec 2023 15:34:44 +0000 (00:34 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:59 +0000 (10:41 +0100)
commit841bcade09640511168e7e768dc9a5652e9e3612
tree782a8491ef900d4efdae23430f031a0726da1774
parent0eaeb8aec49fd572a1ffbddc92d65030acdf55b6
ksmbd: add support for surrogate pair conversion

[ Upstream commit 0c180317c654a494fe429adbf7bc9b0793caf9e2 ]

ksmbd is missing supporting to convert filename included surrogate pair
characters. It triggers a "file or folder does not exist" error in
Windows client.

[Steps to Reproduce for bug]
1. Create surrogate pair file
 touch $(echo -e '\xf0\x9d\x9f\xa3')
 touch $(echo -e '\xf0\x9d\x9f\xa4')

2. Try to open these files in ksmbd share through Windows client.

This patch update unicode functions not to consider about surrogate pair
(and IVS).

Reviewed-by: Marios Makassikis <mmakassikis@freebox.fr>
Tested-by: Marios Makassikis <mmakassikis@freebox.fr>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/unicode.c