]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: prevent rename with empty string
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 30 Apr 2025 02:18:28 +0000 (11:18 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 May 2025 06:24:04 +0000 (08:24 +0200)
commit6ee551672c8cf36108b0cfba92ec0c7c28ac3439
tree3e5ad1c5cf89b6d19566fa2cb44fd6b38b2e143b
parent3482037d0f66cc4ce40e0332fa94ac73b9915de1
ksmbd: prevent rename with empty string

commit 53e3e5babc0963a92d856a5ec0ce92c59f54bc12 upstream.

Client can send empty newname string to ksmbd server.
It will cause a kernel oops from d_alloc.
This patch return the error when attempting to rename
a file or directory with an empty new name string.

Cc: stable@vger.kernel.org
Reported-by: Norbert Szetei <norbert@doyensec.com>
Tested-by: Norbert Szetei <norbert@doyensec.com>
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/smb/server/smb2pdu.c