linux-yocto/fs/smb
Thorsten Blum de17000b40 smb: server: Fix extension string in ksmbd_extract_shortname()
commit 8e7d178d06 upstream.

In ksmbd_extract_shortname(), strscpy() is incorrectly called with the
length of the source string (excluding the NUL terminator) rather than
the size of the destination buffer. This results in "__" being copied
to 'extension' rather than "___" (two underscores instead of three).

Use the destination buffer size instead to ensure that the string "___"
(three underscores) is copied correctly.

Cc: stable@vger.kernel.org
Fixes: e2f34481b2 ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-15 12:05:12 +02:00
..
client smb: client: let recv_done() cleanup before notifying the callers. 2025-08-15 12:05:11 +02:00
common ksmbd: return FILE_DEVICE_DISK instead of super magic 2024-07-25 09:49:19 +02:00
server smb: server: Fix extension string in ksmbd_extract_shortname() 2025-08-15 12:05:12 +02:00
Kconfig
Makefile