]> git.ipfire.org Git - thirdparty/hostap.git/commit
WPS: Explicitly reject Public Key attribute with unexpected length
authorJouni Malinen <j@w1.fi>
Sun, 19 Apr 2015 14:45:33 +0000 (17:45 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 22 Apr 2015 19:05:12 +0000 (22:05 +0300)
commitca68a8b561c48393c8ba25055ce294caaa3ac008
tree159ff4bcb852a0dffa172909df1bfca79e7ae6ce
parent6b94f71dcd16d88845759dad90c13d41675da6e9
WPS: Explicitly reject Public Key attribute with unexpected length

There is no need to try to derive DH shared key with a peer that tries
to use too short or too long DH Public Key. Previously, such cases ended
up implicitly getting rejected by the DH operations failing to produce
matching results. That is unnecessarily, so simply reject the message
completely if it does not have a Public Key with valid length. Accept
couple of octets shorter value to be used to avoid interoperability
issues if there are implementations that do not use zero-padding
properly.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/wps/wps_attr_parse.c