]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 18 Oct 2019 08:26:37 +0000 (04:26 -0400)
commit89ce76e6e9b159e2f9b5f6836a063c862bff02d1
tree12d1d4551b805dbf0a44a217271f18db011ca630
parent779ae8bd9d1c72400ff8b189a2a00209494a34a5
cfg80211: validate SSID/MBSSID element ordering assumption

BugLink: https://bugs.launchpad.net/bugs/1848039
commit 242b0931c1918c56cd1dc5563fd250a3c39b996d upstream.

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: 0b8fb8235be8 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
net/wireless/scan.c