cfg80211: check S1G beacon compat element length
authorJohannes Berg <johannes.berg@intel.com>
Thu, 8 Apr 2021 12:28:27 +0000 (14:28 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Apr 2021 12:44:54 +0000 (14:44 +0200)
commitb5ac0146492fc5c199de767e492be8a66471011a
tree29b01d7603818fa3776369d7b039ca101f9fb997
parentb57aa17f07c9270e576ef7df09f142978b5a75f0
cfg80211: check S1G beacon compat element length

We need to check the length of this element so that we don't
access data beyond its end. Fix that.

Fixes: 9eaffe5078ca ("cfg80211: convert S1G beacon to scan results")
Link: https://lore.kernel.org/r/20210408142826.f6f4525012de.I9fdeff0afdc683a6024e5ea49d2daa3cd2459d11@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c