aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-08-21 13:54:35 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-08-21 16:03:34 +0200
commit32a110e3d9e36fa21fa678aed9b1ac4a9ddc6ac3 (patch)
tree31a16fcbfe383a4b748682788ffe8ecf32adaf56
parent1a00cbc70012ee1334634b91fe3ec174b445f9c2 (diff)
downloadalpine_aports-32a110e3d9e36fa21fa678aed9b1ac4a9ddc6ac3.tar.bz2
alpine_aports-32a110e3d9e36fa21fa678aed9b1ac4a9ddc6ac3.tar.xz
alpine_aports-32a110e3d9e36fa21fa678aed9b1ac4a9ddc6ac3.zip
main/wpa_supplicant: security fix (CVE-2018-14526)
fixes #9222
-rw-r--r--main/wpa_supplicant/APKBUILD6
-rw-r--r--main/wpa_supplicant/rebased-v2.6-0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch44
2 files changed, 49 insertions, 1 deletions
diff --git a/main/wpa_supplicant/APKBUILD b/main/wpa_supplicant/APKBUILD
index 65537e70ce..0e3cdda0de 100644
--- a/main/wpa_supplicant/APKBUILD
+++ b/main/wpa_supplicant/APKBUILD
@@ -2,7 +2,7 @@
2# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 2# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
3pkgname=wpa_supplicant 3pkgname=wpa_supplicant
4pkgver=2.6 4pkgver=2.6
5pkgrel=4 5pkgrel=5
6pkgdesc="A utility providing key negotiation for WPA wireless networks" 6pkgdesc="A utility providing key negotiation for WPA wireless networks"
7url="https://w1.fi/wpa_supplicant/" 7url="https://w1.fi/wpa_supplicant/"
8arch="all" 8arch="all"
@@ -19,6 +19,7 @@ source="http://w1.fi/releases/$pkgname-$pkgver.tar.gz
19 rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch 19 rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch
20 rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch 20 rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
21 rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch 21 rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
22 rebased-v2.6-0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch
22 23
23 wpa_supplicant.initd 24 wpa_supplicant.initd
24 wpa_supplicant.confd 25 wpa_supplicant.confd
@@ -29,6 +30,8 @@ source="http://w1.fi/releases/$pkgname-$pkgver.tar.gz
29 wpa_cli.sh" 30 wpa_cli.sh"
30 31
31# secfixes: 32# secfixes:
33# 2.6-r5:
34# - CVE-2018-14526
32# 2.6-r4: 35# 2.6-r4:
33# - CVE-2017-13077 36# - CVE-2017-13077
34# - CVE-2017-13078 37# - CVE-2017-13078
@@ -107,6 +110,7 @@ a6382d8e84b4829be33c46bf2f4c6f3232c9d924a4547a21dfe023bf5be8ee1c635920295f52be28
10737d050b2e4a3598484912667d8b2705fbe84c5c562267f900d42b0c7b606fb1fed09ddca8b80e2131768baa8f3690aab6ba7a232dee6ff1e66150fdb8816c927 rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch 11037d050b2e4a3598484912667d8b2705fbe84c5c562267f900d42b0c7b606fb1fed09ddca8b80e2131768baa8f3690aab6ba7a232dee6ff1e66150fdb8816c927 rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch
108111e655cfbb3a86e3792040e0ea375490d31c42c9d43cbe911290d54df5f4db437e4c8ad0e937c51729dcefeb0db0989b8ab55b9523398683abd08ebfec18076 rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch 111111e655cfbb3a86e3792040e0ea375490d31c42c9d43cbe911290d54df5f4db437e4c8ad0e937c51729dcefeb0db0989b8ab55b9523398683abd08ebfec18076 rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
109fc84edd8b30305cc42053c872554098f3f077292ec980ed6a442f37884087ff2f055738fd55977ed792bef1887dcc8c4626586465d78dd0258edb83dcd50a65a rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch 112fc84edd8b30305cc42053c872554098f3f077292ec980ed6a442f37884087ff2f055738fd55977ed792bef1887dcc8c4626586465d78dd0258edb83dcd50a65a rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
113c275cb1a41901d3e5389ca301809baa16a73b40afdcd3a24b63b294e1b9e5eaead148b30742273deecbdd03c6b387a6b3da74de2ae6c49a499b5dd326ff4da9f rebased-v2.6-0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch
110cfe9de2813d5ec778c7f5cb404c23aad371dee9922dea172358a8ea95ab4e5dd01a3b9fc1a452dd3c3c9a2f02e8b12ffe162b69767f95faa18480fb79499301b wpa_supplicant.initd 114cfe9de2813d5ec778c7f5cb404c23aad371dee9922dea172358a8ea95ab4e5dd01a3b9fc1a452dd3c3c9a2f02e8b12ffe162b69767f95faa18480fb79499301b wpa_supplicant.initd
11129103161ec2b9631fca9e8d9a97fafd60ffac3fe78cf613b834395ddcaf8be1e253c22e060d7d9f9b974b2d7ce794caa932a2125e29f6494b75bce475f7b30e1 wpa_supplicant.confd 11529103161ec2b9631fca9e8d9a97fafd60ffac3fe78cf613b834395ddcaf8be1e253c22e060d7d9f9b974b2d7ce794caa932a2125e29f6494b75bce475f7b30e1 wpa_supplicant.confd
112e98edc1ecec91335d515c50cac8816e3f6eef139aba574bcf0c6c20c131ef0de40aa657a33d07af09ab28245471a09cb6b3e29b306e48f46d335a0c47a0a56c4 libressl.patch 116e98edc1ecec91335d515c50cac8816e3f6eef139aba574bcf0c6c20c131ef0de40aa657a33d07af09ab28245471a09cb6b3e29b306e48f46d335a0c47a0a56c4 libressl.patch
diff --git a/main/wpa_supplicant/rebased-v2.6-0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch b/main/wpa_supplicant/rebased-v2.6-0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch
new file mode 100644
index 0000000000..a62b52c6b9
--- /dev/null
+++ b/main/wpa_supplicant/rebased-v2.6-0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch
@@ -0,0 +1,44 @@
1From 3e34cfdff6b192fe337c6fb3f487f73e96582961 Mon Sep 17 00:00:00 2001
2From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
3Date: Sun, 15 Jul 2018 01:25:53 +0200
4Subject: [PATCH] WPA: Ignore unauthenticated encrypted EAPOL-Key data
5
6Ignore unauthenticated encrypted EAPOL-Key data in supplicant
7processing. When using WPA2, these are frames that have the Encrypted
8flag set, but not the MIC flag.
9
10When using WPA2, EAPOL-Key frames that had the Encrypted flag set but
11not the MIC flag, had their data field decrypted without first verifying
12the MIC. In case the data field was encrypted using RC4 (i.e., when
13negotiating TKIP as the pairwise cipher), this meant that
14unauthenticated but decrypted data would then be processed. An adversary
15could abuse this as a decryption oracle to recover sensitive information
16in the data field of EAPOL-Key messages (e.g., the group key).
17(CVE-2018-14526)
18
19Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
20---
21 src/rsn_supp/wpa.c | 11 +++++++++++
22 1 file changed, 11 insertions(+)
23
24diff -upr wpa_supplicant-2.6.orig/src/rsn_supp/wpa.c wpa_supplicant-2.6/src/rsn_supp/wpa.c
25--- wpa_supplicant-2.6.orig/src/rsn_supp/wpa.c 2016-10-02 21:51:11.000000000 +0300
26+++ wpa_supplicant-2.6/src/rsn_supp/wpa.c 2018-08-08 16:55:11.506831029 +0300
27@@ -2016,6 +2016,17 @@ int wpa_sm_rx_eapol(struct wpa_sm *sm, c
28
29 if ((sm->proto == WPA_PROTO_RSN || sm->proto == WPA_PROTO_OSEN) &&
30 (key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) {
31+ /*
32+ * Only decrypt the Key Data field if the frame's authenticity
33+ * was verified. When using AES-SIV (FILS), the MIC flag is not
34+ * set, so this check should only be performed if mic_len != 0
35+ * which is the case in this code branch.
36+ */
37+ if (!(key_info & WPA_KEY_INFO_MIC)) {
38+ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
39+ "WPA: Ignore EAPOL-Key with encrypted but unauthenticated data");
40+ goto out;
41+ }
42 if (wpa_supplicant_decrypt_key_data(sm, key, ver, key_data,
43 &key_data_len))
44 goto out;