Commit c4863491 authored by Johannes Berg's avatar Johannes Berg Committed by Jialin Zhang
Browse files

wifi: cfg80211: ensure length byte is present before access

stable inclusion
from stable-v5.10.148
commit 6144c97f96f5cc3ede984b224fdf8dde658cfcad
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0WL

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



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

commit 567e14e3 upstream.

When iterating the elements here, ensure the length byte is
present before checking it to see if the entire element will
fit into the buffer.

Longer term, we should rewrite this code using the type-safe
element iteration macros that check all of this.

Fixes: 0b8fb823 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Reported-by: default avatarSoenke Huster <shuster@seemoo.tu-darmstadt.de>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent e12ee596
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment