staging: r8188eu: prevent ->Ssid overflow in rtw_wx_set_scan()
authorDenis Efremov <denis.e.efremov@oracle.com>
Wed, 18 May 2022 07:00:52 +0000 (11:00 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:21 +0000 (10:23 +0200)
commitac2eab7de458f5e1210ce1237afab40a307075c8
tree1d2462bfa91a16b2d93986b083eddd519d38ceaa
parenta7daaaa84548c62177dd5872cf636d8085cd1b7a
staging: r8188eu: prevent ->Ssid overflow in rtw_wx_set_scan()

commit bc10916e890948d8927a5c8c40fb5dc44be5e1b8 upstream.

This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->Ssid[] array.

Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Denis Efremov <denis.e.efremov@oracle.com>
Link: https://lore.kernel.org/r/20220518070052.108287-1-denis.e.efremov@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/os_dep/ioctl_linux.c