From: Greg Kroah-Hartman Date: Wed, 14 Aug 2019 17:13:56 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v5.2.9~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20cf0574c17c98da5222be2fd16f0750dac9fae4;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: mwifiex-fix-802.11n-wpa-detection.patch --- diff --git a/queue-4.4/mwifiex-fix-802.11n-wpa-detection.patch b/queue-4.4/mwifiex-fix-802.11n-wpa-detection.patch new file mode 100644 index 00000000000..8bdfa9c77ed --- /dev/null +++ b/queue-4.4/mwifiex-fix-802.11n-wpa-detection.patch @@ -0,0 +1,53 @@ +From df612421fe2566654047769c6852ffae1a31df16 Mon Sep 17 00:00:00 2001 +From: Brian Norris +Date: Wed, 24 Jul 2019 12:46:34 -0700 +Subject: mwifiex: fix 802.11n/WPA detection + +From: Brian Norris + +commit df612421fe2566654047769c6852ffae1a31df16 upstream. + +Commit 63d7ef36103d ("mwifiex: Don't abort on small, spec-compliant +vendor IEs") adjusted the ieee_types_vendor_header struct, which +inadvertently messed up the offsets used in +mwifiex_is_wpa_oui_present(). Add that offset back in, mirroring +mwifiex_is_rsn_oui_present(). + +As it stands, commit 63d7ef36103d breaks compatibility with WPA (not +WPA2) 802.11n networks, since we hit the "info: Disable 11n if AES is +not supported by AP" case in mwifiex_is_network_compatible(). + +Fixes: 63d7ef36103d ("mwifiex: Don't abort on small, spec-compliant vendor IEs") +Cc: +Signed-off-by: Brian Norris +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/net/wireless/mwifiex/main.h | 1 + + drivers/net/wireless/mwifiex/scan.c | 3 ++- + 2 files changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/mwifiex/main.h ++++ b/drivers/net/wireless/mwifiex/main.h +@@ -108,6 +108,7 @@ enum { + + #define MWIFIEX_MAX_TOTAL_SCAN_TIME (MWIFIEX_TIMER_10S - MWIFIEX_TIMER_1S) + ++#define WPA_GTK_OUI_OFFSET 2 + #define RSN_GTK_OUI_OFFSET 2 + + #define MWIFIEX_OUI_NOT_PRESENT 0 +--- a/drivers/net/wireless/mwifiex/scan.c ++++ b/drivers/net/wireless/mwifiex/scan.c +@@ -151,7 +151,8 @@ mwifiex_is_wpa_oui_present(struct mwifie + if (((bss_desc->bcn_wpa_ie) && + ((*(bss_desc->bcn_wpa_ie)).vend_hdr.element_id == + WLAN_EID_VENDOR_SPECIFIC))) { +- iebody = (struct ie_body *) bss_desc->bcn_wpa_ie->data; ++ iebody = (struct ie_body *)((u8 *)bss_desc->bcn_wpa_ie->data + ++ WPA_GTK_OUI_OFFSET); + oui = &mwifiex_wpa_oui[cipher][0]; + ret = mwifiex_search_oui_in_ie(iebody, oui); + if (ret) diff --git a/queue-4.4/series b/queue-4.4/series index d3b673fb039..c2c42f90986 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -29,3 +29,4 @@ alsa-firewire-fix-a-memory-leak-bug.patch mac80211-don-t-warn-on-short-wmm-parameters-from-ap.patch smb3-fix-deadlock-in-validate-negotiate-hits-reconnect.patch smb3-send-cap_dfs-capability-during-session-setup.patch +mwifiex-fix-802.11n-wpa-detection.patch