OSDN Git Service

mwifiex: Abort at too short BSS descriptor element
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 May 2019 12:52:20 +0000 (14:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Jul 2019 07:07:09 +0000 (09:07 +0200)
commitf80d2b57a9527389cf312814d716d040c3c7abd9
tree9ea09163434f2eaf09133597f768fb3be9cc2f12
parent85707634a0acda245eb78f2aa05a4254b7fd2fb2
mwifiex: Abort at too short BSS descriptor element

commit 685c9b7750bfacd6fc1db50d86579980593b7869 upstream.

Currently mwifiex_update_bss_desc_with_ie() implicitly assumes that
the source descriptor entries contain the enough size for each type
and performs copying without checking the source size.  This may lead
to read over boundary.

Fix this by putting the source size check in appropriate places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mwifiex/scan.c