staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 5 Mar 2021 08:12:49 +0000 (11:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:23:30 +0000 (09:23 +0100)
commit87107518d7a93fec6cdb2559588862afeee800fb
tree73e094878fa9d399bdb0682f518f140636ee58be
parentfd3ce6557da0e7557a451ee56fc8f5700d3bd08f
staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan()

We need to cap len at IW_ESSID_MAX_SIZE (32) to avoid memory corruption.
This can be controlled by the user via the ioctl.

Fixes: 5f53d8ca3d5d ("Staging: add rtl8192SU wireless usb driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YEHoAWMOSZBUw91F@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U_wx.c