Skip to content
Commit 4f303c0b authored by Kuan-Ting Chen's avatar Kuan-Ting Chen Committed by Greg Kroah-Hartman
Browse files

ksmbd: fix multiple out-of-bounds read during context decoding



commit 0512a5f8 upstream.

Check the remaining data length before accessing the context structure
to ensure that the entire structure is contained within the packet.
Additionally, since the context data length `ctxt_len` has already been
checked against the total packet length `len_of_ctxts`, update the
comparison to use `ctxt_len`.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarKuan-Ting Chen <h3xrabbit@gmail.com>
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 522a9417
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment