summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell/mwifiex/ie.c
Commit message (Collapse)AuthorAgeFilesLines
* mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settingsWen Huang2019-09-031-0/+3
| | | | | | | | | | | | | | | mwifiex_update_vs_ie(),mwifiex_set_uap_rates() and mwifiex_set_wmm_params() call memcpy() without checking the destination size.Since the source is given from user-space, this may trigger a heap buffer overflow. Fix them by putting the length check before performing memcpy(). This fix addresses CVE-2019-14814,CVE-2019-14815,CVE-2019-14816. Signed-off-by: Wen Huang <huangwenabc@gmail.com> Acked-by: Ganapathi Bhat <gbhat@marvell.comg> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: Fix heap overflow in mwifiex_uap_parse_tail_ies()Takashi Iwai2019-06-011-16/+31
| | | | | | | | | | | | | | | | 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>
* mwifiex: Mark expected switch fall-throughGustavo A. R. Silva2018-11-061-0/+1
| | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: Fix skipped vendor specific IEsRoman Stratiienko2018-07-311-1/+7
| | | | | | | | Mwifiex firmware inserts only Microsoft information element Allow other vendor specific IEs to pass from userspace Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: uap: filter duplicate ERP IEXinming Hu2018-04-251-0/+1
| | | | | | | | Firmware parse and attach ERP IE from bss configuration, do not set again from tail IE. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: Use accessors routines for unaligned valuesDaniel Mentz2017-03-201-7/+8
| | | | | | | | | | | | | Synopsys' ARCompact architecture does not support loading from or storing values to unaligned memory locations. We saw a series of misaligned access exceptions on ARC. To work around this issue, we bulk replaced le16_to_cpu and le32_to_cpu with get_unaligned_le16 and get_unaligned_le32, respectively. We also added le16_unaligned_add_cpu which is similar to le16_add_cpu but works with unaligned values. Signed-off-by: Daniel Mentz <danielmentz@google.com> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: handle start AP error paths correctlyAmitkumar Karwar2015-12-111-1/+1
| | | | | | | | | | | | | It's been observed that even if firmware returns an error for a configuration command, we go ahead and start AP. This patch changes the command type from async to sync so that threads waits for command response and return failure start AP. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mwifiex: move under marvell vendor directoryKalle Valo2015-11-181-0/+488
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
OpenPOWER on IntegriCloud