mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame()
[ Upstream commit 1e58252e334dc3f3756f424a157d1b7484464c40 ]
mwifiex_process_tdls_action_frame() without checking
the incoming tdls infomation element's vality before use it,
this may cause multi heap buffer overflows.
Fix them by putting vality check before use it.
IE is TLV struct, but ht_cap and ht_oper aren’t TLV struct.
the origin marvell driver code is wrong:
memcpy((u8 *)&sta_ptr->tdls_cap.ht_capb, pos,...
Fix the bug by changing pos(the address of IE) to
pos+2 ( the address of IE value ).
Signed-off-by: qize wang <firstname.lastname@example.org>
Signed-off-by: Kalle Valo <email@example.com>
Signed-off-by: Sasha Levin <firstname.lastname@example.org>
1 file changed