]> git.hungrycats.org Git - linux/commit
cifs: Fix parsing reparse point with native symlink in SMB1 non-UNICODE session
authorPali Rohár <pali@kernel.org>
Sun, 6 Oct 2024 17:30:01 +0000 (19:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:31 +0000 (13:54 +0100)
commitcd7f8c72dd989730156799ac4f384518ecf38c9a
tree27f42e8f66daa370752278735565ffdf157fd836
parentc9280c017ea13ff8678ef4f1ea78a4b683292e8b
cifs: Fix parsing reparse point with native symlink in SMB1 non-UNICODE session

[ Upstream commit f4ca4f5a36eac9b4da378a0f28cbbe38534a0901 ]

SMB1 NT_TRANSACT_IOCTL/FSCTL_GET_REPARSE_POINT even in non-UNICODE mode
returns reparse buffer in UNICODE/UTF-16 format.

This is because FSCTL_GET_REPARSE_POINT is NT-based IOCTL which does not
distinguish between 8-bit non-UNICODE and 16-bit UNICODE modes and its path
buffers are always encoded in UTF-16.

This change fixes reading of native symlinks in SMB1 when UNICODE session
is not active.

Fixes: ed3e0a149b58 ("smb: client: implement ->query_reparse_point() for SMB1")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/smb1ops.c