]> git.ipfire.org Git - thirdparty/hostap.git/commit - hostapd/config_file.c
WPS: Interpret zero length ap_pin hostapd.conf parameter as "unset"
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 14 Aug 2017 18:07:09 +0000 (21:07 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 14 Aug 2017 18:07:09 +0000 (21:07 +0300)
commitae048257cb78c18b8296ad966314af79c6c0b471
tree91ebbfd8890d546bf3d60932e988bee80f823a48
parent2bdbace634ff76c0ed4302bed3ff199557fc7ef2
WPS: Interpret zero length ap_pin hostapd.conf parameter as "unset"

hostapd allows arbitrary AP PIN to be used in WPS. This means that
setting ap_pin to a zero length string ends up enabling AP PIN so that
external registrars can use this specific zero lenth ap_pin value. There
are apparently some APs that have used this invalid configuration with
unintended results. While the proper fix for that is to fix the
component that generates the invalid configuration, hostapd can also
reject such values since the likelihood of a real world use case for
zero length AP PIN (Device Password) is minimal.

Start interpreting zero length ap_pin parameter value as a request to
"unset" the previously set value in hostapd.conf (or if not previously
set, leave it unset). With this, a hostapd.conf file including the
"ap_pin=" line will end up getting interpretted just like that same file
with the ap_pin parameter completely removed, i.e., with AP PIN being
disabled.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
hostapd/config_file.c