net: wireless: bcmdhd: Fix Android Bug 25662233
authorMichael Hsu <mhsu@nvidia.com>
Fri, 8 Jan 2016 23:16:47 +0000 (15:16 -0800)
committerManish Tuteja <mtuteja@nvidia.com>
Fri, 29 Jan 2016 07:56:42 +0000 (23:56 -0800)
commit78b2b4fd02682f575db368f27e214eb7487710b8
treee0702ed4a6453d8fae0445c6c7d9e269ef8475ce
parent646ca49047138091f3c7c39fa98eb1d8895dcf04
net: wireless: bcmdhd: Fix Android Bug 25662233

Apply slightly modified version of the following patch.  (Original
patch did not handle 0 length WPS_ID_DEVICE_NAME correctly, so it was
modified to fix 0 length condition.)

Original patch source: https://android.googlesource.com/kernel/msm

Original patch commit message:
> commit 68cdc8df1cb6622980b791ce03e99c255c9888af
> Author: dataanddreams <dataanddreams@gmail.com>
> Date:   Mon Nov 30 17:08:54 2015 -0500
>
>     bcmdhd: Add checks for stack buffer overflows
>
>     These two checks prevent exploitable buffer overflows in two scenarios.
>     1. Long WPS_ID_DEVICE_NAME in WPS info elements
>     2. Invalid SSID determined in certain scan results
>
>     Bug: 25662233
>     Change-Id: Ifb2887737aa6218079745f27d59b5f1364b3892e

Bug 1716690

Change-Id: Ib6bedd8c20185d38a16fb144b6b8ab4393de038f
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/999649
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
Tested-by: Manish Tuteja <mtuteja@nvidia.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c