OSDN Git Service

ksmbd: add the check to vaildate if stream protocol length exceeds maximum value
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 24 Sep 2021 00:17:30 +0000 (09:17 +0900)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Oct 2021 05:23:00 +0000 (00:23 -0500)
commit363999901116ffa9a5462215fef25ea9c7f2823c
tree455be8212ffe20e9c6b7cac6de637e091feced15
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896
ksmbd: add the check to vaildate if stream protocol length exceeds maximum value

This patch add MAX_STREAM_PROT_LEN macro and check if stream protocol
length exceeds maximum value. opencode pdu size check in
ksmbd_pdu_size_has_room().

Cc: Tom Talpey <tom@talpey.com>
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Cc: Ralph Böhme <slow@samba.org>
Acked-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/connection.c
fs/ksmbd/smb_common.c
fs/ksmbd/smb_common.h