]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
mac80211: Fix FILS AEAD protection in Association Request frame
authorJouni Malinen <jouni@qca.qualcomm.com>
Sat, 4 Feb 2017 11:59:22 +0000 (13:59 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 6 Feb 2017 06:42:39 +0000 (07:42 +0100)
Incorrect num_elem parameter value (1 vs. 5) was used in the
aes_siv_encrypt() call. This resulted in only the first one of the five
AAD vectors to SIV getting included in calculation. This does not
protect all the contents correctly and would not interoperate with a
standard compliant implementation.

Fix this by using the correct number. A matching fix is needed in the AP
side (hostapd) to get FILS authentication working properly.

Fixes: 39404feee691 ("mac80211: FILS AEAD protection for station mode association frames")
Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/fils_aead.c

index ecfdd97758a386ed9d642a3fc141f2ec6da13db2..e795aaa2aa1f49d4e001f6732661bf42dc9b9b35 100644 (file)
@@ -272,7 +272,7 @@ int fils_encrypt_assoc_req(struct sk_buff *skb,
        crypt_len = skb->data + skb->len - encr;
        skb_put(skb, AES_BLOCK_SIZE);
        return aes_siv_encrypt(assoc_data->fils_kek, assoc_data->fils_kek_len,
-                              encr, crypt_len, 1, addr, len, encr);
+                              encr, crypt_len, 5, addr, len, encr);
 }
 
 int fils_decrypt_assoc_resp(struct ieee80211_sub_if_data *sdata,