staging: wilc1000: potential corruption in wilc_parse_join_bss_param()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 17 Oct 2019 09:18:32 +0000 (12:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:44:19 +0000 (16:44 +0100)
commitb94aedcd8cd65d021e1dcccf39f9ee8cda8c7324
tree5cae587849e82b631db6156fb11eb64fda3716ba
parent696b50bbf68df5afc0e6e7a3f2325a9bc61f811f
staging: wilc1000: potential corruption in wilc_parse_join_bss_param()

[ Upstream commit d59dc92f1bccd5acde793aebdbb4f7121cf3f9af ]

The "rates_len" value needs to be capped so that the memcpy() doesn't
copy beyond the end of the array.

Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Link: https://lore.kernel.org/r/20191017091832.GB31278@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/wilc1000/wilc_hif.c