]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: cfg80211: ensure length byte is present before access
authorJohannes Berg <johannes.berg@intel.com>
Thu, 29 Sep 2022 19:50:44 +0000 (21:50 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 10 Oct 2022 07:50:37 +0000 (09:50 +0200)
commit5723d5638565bddea9bd3a8fa9bc640a7292dc0e
tree1acfd496cd23c8027f019dd925cf298c3ab06457
parentf279124b905209953805d9fbf77cb4277766ae17
wifi: cfg80211: ensure length byte is present before access

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: ac2a324087a0 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Reported-by: Soenke Huster <shuster@seemoo.tu-darmstadt.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c