]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 Jun 2020 10:19:58 +0000 (13:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jun 2020 19:25:38 +0000 (21:25 +0200)
commitad370e769c8c3634b9e2c3f67b07fa48ff783f52
treea4006fa83925e912e06f71d42e27ce3df9568d3e
parentf687fe4b58936d4252710c41f5a340797125e1b5
Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate()

The "ie_len" variable is in the 0-255 range and it comes from the
network.  If it's over NDIS_802_11_LENGTH_RATES_EX (16) then that will
lead to memory corruption.

Fixes: 84ed90a855bc ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200603101958.GA1845750@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_wlan_util.c