]> 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)
commit39f7362328cbd18c4494e470d01928c86f4b2dee
tree1acfd496cd23c8027f019dd925cf298c3ab06457
parent30b9d21add3e87c164f0dd6558eec90aed012f56
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: b397b5577905 ("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