Re: [PATCH] staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()

From: Dan Carpenter
Date: Mon Jul 10 2023 - 02:08:38 EST


On Sun, Jul 09, 2023 at 01:50:07PM +0800, Zhang Shurong wrote:
> The "exc->key_len" is a u16 that comes from the user. If it's over
> IW_ENCODING_TOKEN_MAX (64) that could lead to memory corruption.
>
> Fixes: b121d84882b9 ("staging: ks7010: simplify calls to memcpy()")
>
> Signed-off-by: Zhang Shurong <zhang_shurong@xxxxxxxxxxx>

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter