]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mwifiex: Abort at too short BSS descriptor element
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 May 2019 12:52:20 +0000 (14:52 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 9 Jul 2019 21:04:21 +0000 (22:04 +0100)
commitf287d868569a8aac1207986025061bf5ae6fb1fb
tree73c87423000711fc40edff27d251479154c0cd35
parenta24ac7326f38ffab2b63141496d075da144cec7d
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>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/mwifiex/scan.c