]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: cfg80211: fix buffer overflow in elem comparison
authorJohannes Berg <johannes.berg@intel.com>
Fri, 25 Nov 2022 11:36:57 +0000 (12:36 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 25 Nov 2022 11:43:05 +0000 (12:43 +0100)
commit82597139315f9c7c4e1a98d0405a9e23dcdf4beb
tree25b5697b0e4155a75f8b9933b8bfb47862b4e94b
parentda75138875387cce5ed796dac10589f7e004b7a9
wifi: cfg80211: fix buffer overflow in elem comparison

For vendor elements, the code here assumes that 5 octets
are present without checking. Since the element itself is
already checked to fit, we only need to check the length.

Reported-and-tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
Fixes: b397b5577905 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c