WPS: Reject a Credential with invalid passphrase
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 4 Mar 2016 15:20:18 +0000 (17:20 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 2 May 2016 08:08:25 +0000 (11:08 +0300)
commitecbb0b3dc122b0d290987cf9c84010bbe53e1022
tree54a04335b11122850990e9524ffe768e179c0c96
parentf4830bed661f4adff51f50a0d37c64ceb748e780
WPS: Reject a Credential with invalid passphrase

WPA/WPA2-Personal passphrase is not allowed to include control
characters. Reject a Credential received from a WPS Registrar both as
STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or
WPA2PSK authentication type and includes an invalid passphrase.

This fixes an issue where hostapd or wpa_supplicant could have updated
the configuration file PSK/passphrase parameter with arbitrary data from
an external device (Registrar) that may not be fully trusted. Should
such data include a newline character, the resulting configuration file
could become invalid and fail to be parsed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/utils/common.c
src/utils/common.h
src/wps/wps_attr_process.c