]> git.ipfire.org Git - thirdparty/hostap.git/commit
EAP-pwd: Use constant time and memory access for finding the PWE
authorJouni Malinen <jouni@codeaurora.org>
Tue, 26 Feb 2019 09:59:45 +0000 (11:59 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 9 Apr 2019 14:11:15 +0000 (17:11 +0300)
commitaaf65feac67c3993935634eefe5bc76b9fce03aa
tree4f5c52e3f1ef40047a9305b55e4bf561e3d52b3c
parentc93461c1d98f52681717a088776ab32fd97872b0
EAP-pwd: Use constant time and memory access for finding the PWE

This algorithm could leak information to external observers in form of
timing differences or memory access patterns (cache use). While the
previous implementation had protection against the most visible timing
differences (looping 40 rounds and masking the legendre operation), it
did not protect against memory access patterns between the two possible
code paths in the masking operations. That might be sufficient to allow
an unprivileged process running on the same device to be able to
determine which path is being executed through a cache attack and based
on that, determine information about the used password.

Convert the PWE finding loop to use constant time functions and
identical memory access path without different branches for the QR/QNR
cases to minimize possible side-channel information similarly to the
changes done for SAE authentication. (CVE-2019-9495)

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/eap_common/eap_pwd_common.c