UPSTREAM: brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
authorArend van Spriel <arend.vanspriel@broadcom.com>
Fri, 2 Sep 2016 08:37:24 +0000 (09:37 +0100)
committerDmitry Shmidt <dimitrysh@google.com>
Fri, 16 Sep 2016 18:29:21 +0000 (18:29 +0000)
commit4277d7534ed7af7f103e20504dff3aead7799c99
tree200439bff29bbcd660ac889d5843ce2d13725b2a
parent7152164d7b5fdfe68423ca1568fc227e92d3d6f7
UPSTREAM: brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()

commit ded89912156b1a47d940a0c954c43afbabd0c42c upstream

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.4, v4.1
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>
drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c