Files
linux/fs
Thorsten Blum 2f4d88f5e5 smb: server: Fix extension string in ksmbd_extract_shortname()
commit 8e7d178d06e8937454b6d2f2811fa6a15656a214 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:09:06 +02:00
..
2024-08-19 06:04:25 +02:00
2025-08-01 09:47:32 +01:00
2024-10-22 15:46:20 +02:00
2025-08-15 12:08:40 +02:00
2023-08-31 12:07:34 -05:00
2024-08-19 06:04:25 +02:00
2025-03-22 12:50:41 -07:00
2024-02-23 09:25:13 +01:00
2023-05-17 09:16:59 +02:00
2023-08-21 13:46:25 -07:00
2023-08-14 18:48:02 +02:00
2023-08-19 12:12:12 +02:00
2023-08-02 09:13:09 -06:00
2023-01-19 09:24:30 +01:00
2023-07-13 10:28:04 +02:00
2023-05-19 04:30:22 +02:00
2023-05-19 04:30:22 +02:00
2023-08-15 08:32:45 +02:00
2024-08-19 06:04:25 +02:00
2025-06-27 11:08:57 +01:00