]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
authorZhang Shurong <zhang_shurong@foxmail.com>
Sun, 9 Jul 2023 05:50:07 +0000 (13:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 07:54:33 +0000 (09:54 +0200)
commit5f1c7031e044cb2fba82836d55cc235e2ad619dc
treebdd7bd8aa7c5e54ee11c2b548b8ee5f34986e316
parent4912649e1cf0317bf563f91655e04a303cacaf8d
staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()

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()")
Cc: stable <stable@kernel.org>
Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/tencent_5153B668C0283CAA15AA518325346E026A09@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c