diff options
author | Arend Van Spriel <arend.vanspriel@broadcom.com> | 2016-09-05 10:45:47 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-09-07 16:43:50 +0300 |
commit | ded89912156b1a47d940a0c954c43afbabd0c42c (patch) | |
tree | e46601d21d00ac4cd15e3f199aed6e9bb2b76bed /drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | |
parent | a9840c46ff9bb845d62d6f9592ab76c0e531c8f4 (diff) | |
download | linux-ded89912156b1a47d940a0c954c43afbabd0c42c.tar.gz linux-ded89912156b1a47d940a0c954c43afbabd0c42c.tar.bz2 linux-ded89912156b1a47d940a0c954c43afbabd0c42c.zip |
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
User-space can choose to omit NL80211_ATTR_SSID and only provide raw
IE TLV data. When doing so it can provide SSID IE with length exceeding
the allowed size. The driver further processes this IE copying it
into a local variable without checking the length. Hence stack can be
corrupted and used as exploit.
Cc: stable@vger.kernel.org # v4.7
Reported-by: Daxing Guo <freener.gdx@gmail.com>
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 5db56a74e7df..b8aec5e5ef93 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4527,7 +4527,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, (u8 *)&settings->beacon.head[ie_offset], settings->beacon.head_len - ie_offset, WLAN_EID_SSID); - if (!ssid_ie) + if (!ssid_ie || ssid_ie->len > IEEE80211_MAX_SSID_LEN) return -EINVAL; memcpy(ssid_le.SSID, ssid_ie->data, ssid_ie->len); |