Skip to content
Commit 19b2b9af 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



[ Upstream commit 0512a5f8 ]

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 61a306c1
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