summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell/mwifiex/fw.h
diff options
context:
space:
mode:
authorMaximilian Luz <luzmaximilian@gmail.com>2020-08-25 17:38:29 +0200
committerKalle Valo <kvalo@codeaurora.org>2020-08-27 16:16:04 +0300
commit4afc850e2e9e781976fb2c7852ce7bac374af938 (patch)
treeb5cfe7d3dbce54d30c5ce436410de9c79b612659 /drivers/net/wireless/marvell/mwifiex/fw.h
parentb4be5a53ebf478ffcfb4c98c0ccc4a8d922b9a02 (diff)
downloadlinux-4afc850e2e9e781976fb2c7852ce7bac374af938.tar.gz
linux-4afc850e2e9e781976fb2c7852ce7bac374af938.tar.bz2
linux-4afc850e2e9e781976fb2c7852ce7bac374af938.zip
mwifiex: Increase AES key storage size to 256 bits
Following commit e18696786548 ("mwifiex: Prevent memory corruption handling keys") the mwifiex driver fails to authenticate with certain networks, specifically networks with 256 bit keys, and repeatedly asks for the password. The kernel log repeats the following lines (id and bssid redacted): mwifiex_pcie 0000:01:00.0: info: trying to associate to '<id>' bssid <bssid> mwifiex_pcie 0000:01:00.0: info: associated to bssid <bssid> successfully mwifiex_pcie 0000:01:00.0: crypto keys added mwifiex_pcie 0000:01:00.0: info: successfully disconnected from <bssid>: reason code 3 Tracking down this problem lead to the overflow check introduced by the aforementioned commit into mwifiex_ret_802_11_key_material_v2(). This check fails on networks with 256 bit keys due to the current storage size for AES keys in struct mwifiex_aes_param being only 128 bit. To fix this issue, increase the storage size for AES keys to 256 bit. Fixes: e18696786548 ("mwifiex: Prevent memory corruption handling keys") Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Reported-by: Kaloyan Nikolov <konik98@gmail.com> Tested-by: Kaloyan Nikolov <konik98@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Tested-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200825153829.38043-1-luzmaximilian@gmail.com
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/fw.h')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/fw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h
index 8047e307892e..d9f8bdbc817b 100644
--- a/drivers/net/wireless/marvell/mwifiex/fw.h
+++ b/drivers/net/wireless/marvell/mwifiex/fw.h
@@ -954,7 +954,7 @@ struct mwifiex_tkip_param {
struct mwifiex_aes_param {
u8 pn[WPA_PN_SIZE];
__le16 key_len;
- u8 key[WLAN_KEY_LEN_CCMP];
+ u8 key[WLAN_KEY_LEN_CCMP_256];
} __packed;
struct mwifiex_wapi_param {