Skip to content
Commit 0512a5f8 authored by Kuan-Ting Chen's avatar Kuan-Ting Chen Committed by Steve French
Browse files

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



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>
parent d738950f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment