staging: rtl8723bs: Prevent an underflow in rtw_check_beacon_data().
authorMurray McAllister <murray.mcallister@insomniasec.com>
Mon, 2 Jul 2018 01:07:28 +0000 (13:07 +1200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jul 2018 09:39:24 +0000 (11:39 +0200)
commite5bb39faedd770f6fc56f5a98f72c4e4304aa294
treef3199fb6aa31c6b36f4332a2f0faedb14802e690
parent908bfe10dd14e8c4d858bed3e37c4748819f1bf6
staging: rtl8723bs: Prevent an underflow in rtw_check_beacon_data().

commit 920c92448839bd4f8eb87a92b08cad56d449caff upstream.

Dan Carpenter reported an integer underflow issue in the rtl8188eu driver.
This is also needed for the length (signed integer) in rtl8723bs, as it is
later converted to an unsigned integer and used in a memcpy operation.

Original issue is at https://patchwork.kernel.org/patch/9796371/

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Murray McAllister <murray.mcallister@insomniasec.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_ap.c