summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin.berg@intel.com>2023-06-15 20:31:01 +0300
committeriwlwifi publisher <>2023-06-16 06:28:51 +0000
commitfb283daa4b23a7b57bfdc635218bfff970458609 (patch)
tree88cf86ecc48559f0e053602c8648c590f2b8383c
parent687ce20a85dc92b05b9a2fe4b40998f029f48b08 (diff)
downloadbackport-iwlwifi-fb283daa4b23a7b57bfdc635218bfff970458609.tar.gz
[BUGFIX] wifi: mac80211: permit unprotected assoc/deauth before 4-way-HS
Even when MFP is used, a DEAUTH/DISASSOC that happens before the 4-way handshake completes will not have a key set. As such, these frames cannot be protected and should not be suppressed. type=bugfix ticket=none fixes=Ife369dbb61c87e311ce15739d5b2b4763bfdfbae Change-Id: Ia1b43b15cc19fab39a01adf353b2b9e080655442 Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/60746 tested: iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> automatic-review: iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> Reviewed-by: Berg, Johannes <johannes.berg@intel.com> x-iwlwifi-stack-dev: 615f51f3d819f29557acf4d9c3954928fd5223f4
-rw-r--r--net/mac80211/rx.c10
-rw-r--r--versions2
2 files changed, 10 insertions, 2 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 7d586d7a72..6a4538d709 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2427,10 +2427,18 @@ ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
if (unlikely(!ieee80211_has_protected(fc) &&
ieee80211_is_unicast_robust_mgmt_frame(rx->skb))) {
if (ieee80211_is_deauth(fc) ||
- ieee80211_is_disassoc(fc))
+ ieee80211_is_disassoc(fc)) {
+ /*
+ * Permit unprotected deauth/disassoc frames
+ * during 4-way-HS (key is installed after HS).
+ */
+ if (!rx->key)
+ return 0;
+
cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
rx->skb->data,
rx->skb->len);
+ }
return -EACCES;
}
/* BIP does not use Protected field, so need to check MMIE */
diff --git a/versions b/versions
index d7cd89cff5..e11fc07beb 100644
--- a/versions
+++ b/versions
@@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)"
BACKPORTED_KERNEL_VERSION="(see git)"
BACKPORTED_KERNEL_NAME="iwlwifi"
BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__
-BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11307:53d05352"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11308:615f51f3"