]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: fix wrong DataOffset validation of create context
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 25 Aug 2023 14:39:40 +0000 (23:39 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Sep 2023 20:28:37 +0000 (21:28 +0100)
commit2e3f57f74c0af085a2519860eac42b33f7659600
tree95c95831aa943a788d87437a03485a605497b16d
parentb3ad7f39fd8561d68d1147907b38a7aad6b1828b
ksmbd: fix wrong DataOffset validation of create context

commit 17d5b135bb720832364e8f55f6a887a3c7ec8fdb upstream.

If ->DataOffset of create context is 0, DataBuffer size is not correctly
validated. This patch change wrong validation code and consider tag
length in request.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-21824
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/ksmbd/oplock.c