[PATCH 1/2] [PATCH] mesh: Fix SIGSEGV when SAE without passphrase
Masashi Honma
masashi.honma
Fri Aug 8 00:17:19 PDT 2014
If I type these commands,
$ wpa_cli add_network
$ wpa_cli set_network 0 ssid '"commell_2X_mmm"'
$ wpa_cli set_network 0 mode 5
$ wpa_cli set_network 0 frequency 2412
$ wpa_cli set_network 0 key_mgmt SAE
$ wpa_cli mesh_group_add 0
SIGSEGV below occurs.
-----------------------
WPA_TRACE: eloop SIGSEGV - START
[1]: ./hostap/wpa_supplicant/wpa_supplicant() [0x806afef]
eloop_sigsegv_handler() ../src/utils/eloop.c:110
[2]: [0xb77b9400]
[3]: /lib/i386-linux-gnu/libc.so.6(+0x83ad6) [0xb7320ad6]
[4]: ./hostap/wpa_supplicant/wpa_supplicant(wpa_supplicant_join_mesh+0x32c) [0x806ef1c]
wpa_supplicant_mesh_init() mesh.c:209
wpa_supplicant_join_mesh() mesh.c:288
[5]: ./hostap/wpa_supplicant/wpa_supplicant(wpa_supplicant_associate+0xf6) [0x80dfce6]
wpa_supplicant_associate() wpa_supplicant.c:1434
[6]: ./hostap/wpa_supplicant/wpa_supplicant() [0x80ea779]
wpa_supplicant_scan() scan.c:697
[7]: ./hostap/wpa_supplicant/wpa_supplicant(eloop_run+0x1e6) [0x806bda6]
eloop_run() ../src/utils/eloop.c:996
[8]: ./hostap/wpa_supplicant/wpa_supplicant(wpa_supplicant_run+0x5e) [0x80de75e]
wpa_supplicant_run() wpa_supplicant.c:4186
[9]: ./hostap/wpa_supplicant/wpa_supplicant(main+0x369) [0x8060459]
main() main.c:340
WPA_TRACE: eloop SIGSEGV - END
-----------------------
This patch fixes this issue.
Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
wpa_supplicant/mesh.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 25b0eb6..401de40 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -186,6 +186,12 @@ wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
}
if (mconf->security != MESH_CONF_SEC_NONE) {
+ if (ssid->passphrase == NULL) {
+ wpa_printf(MSG_ERROR, "mesh: passphrase for SAE is "
+ "not configured");
+ goto out_free;
+ }
+
bss->conf->wpa = ssid->proto;
bss->conf->wpa_key_mgmt = ssid->key_mgmt;
bss->conf->sae_groups = wpa_s->conf->sae_groups;
--
1.9.1
More information about the Hostap
mailing list