[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKYAXd-43SFJNDEk3CwzXZ5SDVmpDbj9aG88hGAp=dCv63JCtA@mail.gmail.com>
Date: Wed, 6 Aug 2025 11:41:54 +0900
From: Namjae Jeon <linkinjeon@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Steve French <smfrench@...il.com>, Sergey Senozhatsky <senozhatsky@...omium.org>,
Tom Talpey <tom@...pey.com>, Ronnie Sahlberg <lsahlber@...hat.com>, Hyunchul Lee <hyc.lee@...il.com>,
stable@...r.kernel.org, Steve French <stfrench@...rosoft.com>,
Namjae Jeon <namjae.jeon@...sung.com>, linux-cifs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] smb: server: Fix extension string in ksmbd_extract_shortname()
On Wed, Aug 6, 2025 at 10:04 AM Thorsten Blum <thorsten.blum@...ux.dev> wrote:
>
> 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@...r.kernel.org
> Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
Applied it to #ksmbd-for-next-next.
Thanks!
Powered by blists - more mailing lists