]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: validate SSID/MBSSID element ordering assumption
authorJohannes Berg <johannes.berg@intel.com>
Fri, 20 Sep 2019 19:54:18 +0000 (21:54 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 1 Oct 2019 15:56:18 +0000 (17:56 +0200)
commit0d149dc4072f5180af291f944e95202f5d7f116c
treeb77f7a1be393914362e12da3a769d8ff0d27746a
parent2cfa7b788f4207847919ae1f16d2886c7c0c3f39
cfg80211: validate SSID/MBSSID element ordering assumption

The code copying the data assumes that the SSID element is
before the MBSSID element, but since the data is untrusted
from the AP, this cannot be guaranteed.

Validate that this is indeed the case and ignore the MBSSID
otherwise, to avoid having to deal with both cases for the
copy of data that should be between them.

Cc: stable@vger.kernel.org
Fixes: b397b5577905 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Link: https://lore.kernel.org/r/1569009255-I1673911f5eae02964e21bdc11b2bf58e5e207e59@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c