summaryrefslogtreecommitdiffstats
path: root/Kbuild
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-31 15:18:41 +0200
committerBen Hutchings <ben@decadent.org.uk>2019-07-09 22:04:22 +0100
commita62393d7eb63bd075c51154002825cc7ab4dd3eb (patch)
treea4bc070e6961eb2dfb23af273e3492a51d783953 /Kbuild
parentf287d868569a8aac1207986025061bf5ae6fb1fb (diff)
downloadlinux-stable-a62393d7eb63bd075c51154002825cc7ab4dd3eb.tar.gz
linux-stable-a62393d7eb63bd075c51154002825cc7ab4dd3eb.tar.bz2
linux-stable-a62393d7eb63bd075c51154002825cc7ab4dd3eb.zip
mwifiex: Fix heap overflow in mwifiex_uap_parse_tail_ies()
commit 69ae4f6aac1578575126319d3f55550e7e440449 upstream. A few places in mwifiex_uap_parse_tail_ies() perform memcpy() unconditionally, which may lead to either buffer overflow or read over boundary. This patch addresses the issues by checking the read size and the destination size at each place more properly. Along with the fixes, the patch cleans up the code slightly by introducing a temporary variable for the token size, and unifies the error path with the standard goto statement. Reported-by: huangwen <huangwen@venustech.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> [bwh: Backported to 3.16: - The tail IEs are parsed in mwifiex_set_mgmt_ies, which looks for two specific IEs rather than looping - Check IE length against tail length after calling cfg80211_find_vendor_ie(), but not after cfg80211_find_ie() since that already does it - On error, return without calling mwifiex_set_mgmt_beacon_data_ies() - Drop inapplicable change to WMM IE handling - Adjust filename] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions