staging: ks7010: prevent buffer overflow in ks_wlan_set_scan()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 2 Mar 2021 11:19:39 +0000 (14:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:03:53 +0000 (17:03 +0100)
commit9fe42273b2c6bbd98b031fa93a6fa9ab2e99f121
treeafe1439365f7a02b4f0892eabd53f2fdc91635a9
parentab42f28d5f3471a2880e9f522964627b45a3e22e
staging: ks7010: prevent buffer overflow in ks_wlan_set_scan()

commit e163b9823a0b08c3bb8dc4f5b4b5c221c24ec3e5 upstream.

The user can specify a "req->essid_len" of up to 255 but if it's
over IW_ESSID_MAX_SIZE (32) that can lead to memory corruption.

Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YD4fS8+HmM/Qmrw6@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c