OSDN Git Service

ksmbd: fix wrong DataOffset validation of create context
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 25 Aug 2023 14:39:40 +0000 (23:39 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 29 Aug 2023 17:30:20 +0000 (12:30 -0500)
commit17d5b135bb720832364e8f55f6a887a3c7ec8fdb
tree8a9a1dab246e2aa488dbc58b48b2998146cd327b
parentbf26f1b4e0918f017775edfeacf6d867204b680b
ksmbd: fix wrong DataOffset validation of create context

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>
fs/smb/server/oplock.c