summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Qiyu <huangqy.fnst@cn.fujitsu.com>2017-04-26 10:22:03 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2017-04-26 20:14:16 +0200
commitba89d451fba299f00f3dff902cc6456106525fc9 (patch)
tree749eec8daa681fe82f45a2a6f92099061eefba8f
parentff85915aa00f44f108cb0e6fda7f11de08f33803 (diff)
downloadmeta-openembedded-ba89d451fba299f00f3dff902cc6456106525fc9.tar.gz
hostapd: 2.5 -> 2.6
1) Upgrade hostapd from 2.5 to 2.6. 2) License checksum changed,since the copyright years were updated. 2) Delete patch "0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch", since it is integrated upstream. Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-connectivity/hostapd/hostapd/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch86
-rw-r--r--meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb (renamed from meta-oe/recipes-connectivity/hostapd/hostapd_2.5.bb)8
2 files changed, 4 insertions, 90 deletions
diff --git a/meta-oe/recipes-connectivity/hostapd/hostapd/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch b/meta-oe/recipes-connectivity/hostapd/hostapd/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch
deleted file mode 100644
index 2fc78968a..000000000
--- a/meta-oe/recipes-connectivity/hostapd/hostapd/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1From ecbb0b3dc122b0d290987cf9c84010bbe53e1022 Mon Sep 17 00:00:00 2001
2From: Jouni Malinen <jouni@qca.qualcomm.com>
3Date: Fri, 4 Mar 2016 17:20:18 +0200
4Subject: [PATCH 1/1] WPS: Reject a Credential with invalid passphrase
5
6WPA/WPA2-Personal passphrase is not allowed to include control
7characters. Reject a Credential received from a WPS Registrar both as
8STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or
9WPA2PSK authentication type and includes an invalid passphrase.
10
11This fixes an issue where hostapd or wpa_supplicant could have updated
12the configuration file PSK/passphrase parameter with arbitrary data from
13an external device (Registrar) that may not be fully trusted. Should
14such data include a newline character, the resulting configuration file
15could become invalid and fail to be parsed.
16
17Upstream-Status: Backport
18
19CVE: CVE-2016-4476
20
21Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
22Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
23---
24 src/utils/common.c | 12 ++++++++++++
25 src/utils/common.h | 1 +
26 src/wps/wps_attr_process.c | 10 ++++++++++
27 3 files changed, 23 insertions(+)
28
29diff --git a/src/utils/common.c b/src/utils/common.c
30index 450e2c6..27b7c02 100644
31--- a/src/utils/common.c
32+++ b/src/utils/common.c
33@@ -697,6 +697,18 @@ int is_hex(const u8 *data, size_t len)
34 }
35
36
37+int has_ctrl_char(const u8 *data, size_t len)
38+{
39+ size_t i;
40+
41+ for (i = 0; i < len; i++) {
42+ if (data[i] < 32 || data[i] == 127)
43+ return 1;
44+ }
45+ return 0;
46+}
47+
48+
49 size_t merge_byte_arrays(u8 *res, size_t res_len,
50 const u8 *src1, size_t src1_len,
51 const u8 *src2, size_t src2_len)
52diff --git a/src/utils/common.h b/src/utils/common.h
53index 701dbb2..a972240 100644
54--- a/src/utils/common.h
55+++ b/src/utils/common.h
56@@ -488,6 +488,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
57
58 char * wpa_config_parse_string(const char *value, size_t *len);
59 int is_hex(const u8 *data, size_t len);
60+int has_ctrl_char(const u8 *data, size_t len);
61 size_t merge_byte_arrays(u8 *res, size_t res_len,
62 const u8 *src1, size_t src1_len,
63 const u8 *src2, size_t src2_len);
64diff --git a/src/wps/wps_attr_process.c b/src/wps/wps_attr_process.c
65index eadb22f..e8c4579 100644
66--- a/src/wps/wps_attr_process.c
67+++ b/src/wps/wps_attr_process.c
68@@ -229,6 +229,16 @@ static int wps_workaround_cred_key(struct wps_credential *cred)
69 cred->key_len--;
70 #endif /* CONFIG_WPS_STRICT */
71 }
72+
73+
74+ if (cred->auth_type & (WPS_AUTH_WPAPSK | WPS_AUTH_WPA2PSK) &&
75+ (cred->key_len < 8 || has_ctrl_char(cred->key, cred->key_len))) {
76+ wpa_printf(MSG_INFO, "WPS: Reject credential with invalid WPA/WPA2-Personal passphrase");
77+ wpa_hexdump_ascii_key(MSG_INFO, "WPS: Network Key",
78+ cred->key, cred->key_len);
79+ return -1;
80+ }
81+
82 return 0;
83 }
84
85--
861.9.1
diff --git a/meta-oe/recipes-connectivity/hostapd/hostapd_2.5.bb b/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb
index ab01235ec..3b74f482a 100644
--- a/meta-oe/recipes-connectivity/hostapd/hostapd_2.5.bb
+++ b/meta-oe/recipes-connectivity/hostapd/hostapd_2.6.bb
@@ -1,7 +1,7 @@
1HOMEPAGE = "http://w1.fi/hostapd/" 1HOMEPAGE = "http://w1.fi/hostapd/"
2SECTION = "kernel/userland" 2SECTION = "kernel/userland"
3LICENSE = "GPLv2 | BSD" 3LICENSE = "GPLv2 | BSD"
4LIC_FILES_CHKSUM = "file://${B}/README;md5=4d53178f44d4b38418a4fa8de365e11c" 4LIC_FILES_CHKSUM = "file://${B}/README;md5=8aa4e8c78b59b12016c4cb2d0a8db350"
5DEPENDS = "libnl openssl" 5DEPENDS = "libnl openssl"
6SUMMARY = "User space daemon for extended IEEE 802.11 management" 6SUMMARY = "User space daemon for extended IEEE 802.11 management"
7 7
@@ -16,7 +16,6 @@ SRC_URI = " \
16 file://defconfig \ 16 file://defconfig \
17 file://init \ 17 file://init \
18 file://hostapd.service \ 18 file://hostapd.service \
19 file://0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch \
20" 19"
21 20
22S = "${WORKDIR}/hostapd-${PV}" 21S = "${WORKDIR}/hostapd-${PV}"
@@ -43,5 +42,6 @@ do_install() {
43 42
44CONFFILES_${PN} += "${sysconfdir}/hostapd.conf" 43CONFFILES_${PN} += "${sysconfdir}/hostapd.conf"
45 44
46SRC_URI[md5sum] = "69f9cec3f76d74f402864a43e4f8624f" 45SRC_URI[md5sum] = "eaa56dce9bd8f1d195eb62596eab34c7"
47SRC_URI[sha256sum] = "8e272d954dc0d7026c264b79b15389ec2b2c555b32970de39f506b9f463ec74a" 46SRC_URI[sha256sum] = "01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d"
47