Namjae Jeon f03face5fd ksmbd: limit pdu length size according to connection status
commit 62c487b53a7ff31e322cf2874d3796b8202c54a5 upstream.

Stream protocol length will never be larger than 16KB until session setup.
After session setup, the size of requests will not be larger than
16KB + SMB2 MAX WRITE size. This patch limits these invalidly oversized
requests and closes the connection immediately.

Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers")
Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18259
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>
2023-02-01 08:34:38 +01:00
..
2021-06-28 16:28:31 +09:00
2021-11-11 19:22:58 -06:00
2021-06-28 16:28:31 +09:00
2021-07-02 16:27:10 +09:00
2021-06-28 16:28:31 +09:00
2022-04-14 20:56:13 -05:00
2023-02-01 08:34:37 +01:00
2022-10-05 01:15:44 -05:00
2021-06-28 16:28:31 +09:00
2021-06-28 16:28:31 +09:00
2021-06-28 16:28:31 +09:00
2021-06-28 16:28:31 +09:00