Commit 563c1e09 authored by Phil Turnbull's avatar Phil Turnbull Committed by Zheng Zengkai
Browse files

wifi: wilc1000: validate number of channels

stable inclusion
from stable-v5.10.157
commit 3eb6b89a4e9f9e44c3170d70d8d16c3c8dc8c800
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I66LQ3?from=project-issue
CVE: CVE-2022-47518

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3eb6b89a4e9f9e44c3170d70d8d16c3c8dc8c800



--------------------------------

commit 0cdfa9e6 upstream.

There is no validation of 'e->no_of_channels' which can trigger an
out-of-bounds write in the following 'memset' call. Validate that the
number of channels does not extends beyond the size of the channel list
element.

Signed-off-by: default avatarPhil Turnbull <philipturnbull@github.com>
Tested-by: default avatarAjay Kathat <ajay.kathat@microchip.com>
Acked-by: default avatarAjay Kathat <ajay.kathat@microchip.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221123153543.8568-5-philipturnbull@github.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c62a9a0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment