]> git.ipfire.org Git - thirdparty/hostap.git/commit
EAP-pwd peer: Fix payload length validation for Commit and Confirm
authorJouni Malinen <j@w1.fi>
Fri, 1 May 2015 13:37:45 +0000 (16:37 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 3 May 2015 15:26:50 +0000 (18:26 +0300)
commitdd2f043c9c43d156494e33d7ce22db96e6ef42c7
tree6da2c13fbe5ce7ed17db76df4a914ba18cadb74b
parentf79a5fa0068d7c770b2631e3030bca07892f99fe
EAP-pwd peer: Fix payload length validation for Commit and Confirm

The length of the received Commit and Confirm message payloads was not
checked before reading them. This could result in a buffer read
overflow when processing an invalid message.

Fix this by verifying that the payload is of expected length before
processing it. In addition, enforce correct state transition sequence to
make sure there is no unexpected behavior if receiving a Commit/Confirm
message before the previous exchanges have been completed.

Thanks to Kostya Kortchinsky of Google security team for discovering and
reporting this issue.

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