Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-08-16 22:01:45 +0200
committerJiri Slaby <jslaby@suse.cz>2019-08-16 22:25:11 +0200
commit1c24455dce03397f028258b91918101c4bf046ef (patch)
tree3fd953c15c8757d09f85f82fdc2213ce19d179dc
parenta52a7a94b5494c114706bb0f7e2f0c0340490214 (diff)
mac80211: don't WARN on short WMM parameters from AP
-rw-r--r--patches.kernel.org/5.2.9-130-mac80211-don-t-WARN-on-short-WMM-parameters-fro.patch58
-rw-r--r--series.conf1
2 files changed, 59 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.9-130-mac80211-don-t-WARN-on-short-WMM-parameters-fro.patch b/patches.kernel.org/5.2.9-130-mac80211-don-t-WARN-on-short-WMM-parameters-fro.patch
new file mode 100644
index 0000000000..9c81c1263d
--- /dev/null
+++ b/patches.kernel.org/5.2.9-130-mac80211-don-t-WARN-on-short-WMM-parameters-fro.patch
@@ -0,0 +1,58 @@
+From: Brian Norris <briannorris@chromium.org>
+Date: Fri, 26 Jul 2019 15:47:58 -0700
+Subject: [PATCH] mac80211: don't WARN on short WMM parameters from AP
+References: bnc#1012628
+Patch-mainline: 5.2.9
+Git-commit: 05aaa5c97dce4c10a9e7eae2f1569a684e0c5ced
+
+commit 05aaa5c97dce4c10a9e7eae2f1569a684e0c5ced upstream.
+
+In a very similar spirit to commit c470bdc1aaf3 ("mac80211: don't WARN
+on bad WMM parameters from buggy APs"), an AP may not transmit a
+fully-formed WMM IE. For example, it may miss or repeat an Access
+Category. The above loop won't catch that and will instead leave one of
+the four ACs zeroed out. This triggers the following warning in
+drv_conf_tx()
+
+ wlan0: invalid CW_min/CW_max: 0/0
+
+and it may leave one of the hardware queues unconfigured. If we detect
+such a case, let's just print a warning and fall back to the defaults.
+
+Tested with a hacked version of hostapd, intentionally corrupting the
+IEs in hostapd_eid_wmm().
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Brian Norris <briannorris@chromium.org>
+Link: https://lore.kernel.org/r/20190726224758.210953-1-briannorris@chromium.org
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ net/mac80211/mlme.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
+index 379d2ab6d327..36b60f39930b 100644
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -2041,6 +2041,16 @@ ieee80211_sta_wmm_params(struct ieee80211_local *local,
+ ieee80211_regulatory_limit_wmm_params(sdata, &params[ac], ac);
+ }
+
++ /* WMM specification requires all 4 ACIs. */
++ for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
++ if (params[ac].cw_min == 0) {
++ sdata_info(sdata,
++ "AP has invalid WMM params (missing AC %d), using defaults\n",
++ ac);
++ return false;
++ }
++ }
++
+ for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
+ mlme_dbg(sdata,
+ "WMM AC=%d acm=%d aifs=%d cWmin=%d cWmax=%d txop=%d uapsd=%d, downgraded=%d\n",
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index 5b5e003066..4de0ff82b4 100644
--- a/series.conf
+++ b/series.conf
@@ -1150,6 +1150,7 @@
patches.kernel.org/5.2.9-127-ALSA-hiface-fix-multiple-memory-leak-bugs.patch
patches.kernel.org/5.2.9-128-ALSA-hda-Don-t-override-global-PCM-hw-info-flag.patch
patches.kernel.org/5.2.9-129-ALSA-hda-Workaround-for-crackled-sound-on-AMD-c.patch
+ patches.kernel.org/5.2.9-130-mac80211-don-t-WARN-on-short-WMM-parameters-fro.patch
########################################################
# Build fixes that apply to the vanilla kernel too.