Commit 83a67ffcf1b3130151fe8b462b70b46106f689f6

Authored by Jes Sorensen
Committed by Greg Kroah-Hartman
1 parent 0a6626aa24

mac80211: avoid using uninitialized stack data

commit 7e6225a1604d0c6aa4140289bf5761868ffc9c83 upstream.

Avoid a case where we would access uninitialized stack data if the AP
advertises HT support without 40MHz channel support.

Fixes: f3000e1b43f1 ("mac80211: fix broken use of VHT/20Mhz with some APs")
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -174,6 +174,7 @@
174 174 if (!(ht_cap->cap_info &
175 175 cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH_20_40))) {
176 176 ret = IEEE80211_STA_DISABLE_40MHZ;
  177 + vht_chandef = *chandef;
177 178 goto out;
178 179 }
179 180