Staging: rtl8188eu: overflow in update_sta_support_rate()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 7 Apr 2014 06:31:21 +0000 (09:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:11:52 +0000 (20:11 -0700)
commit6f2f288f2065c3e7b5239c455c75258547f5c9ac
tree6ffc7ff10bdadfd072aaf51923800a1038afe9b0
parenta71d6ec8c874049a24d36f70dd832c73bbbc4719
Staging: rtl8188eu: overflow in update_sta_support_rate()

commit 9dbd79aeb9842144d9a114a979a12c0949ee11eb upstream.

The ->SupportedRates[] array has NDIS_802_11_LENGTH_RATES_EX (16)
elements.  Since "ie_len" comes from then network and can go up to 255
then it means we should add a range check to prevent memory corruption.

Fixes: d6846af679e0 ('staging: r8188eu: Add files for new driver - part 7')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_wlan_util.c