Prevent installation of an all-zero TK

Properly track whether a PTK has already been installed to the driver
and the TK part cleared from memory. This prevents an attacker from
trying to trick the client into installing an all-zero TK.

This fixes the earlier fix in commit
ad00d64e7d8827b3cebd665a0ceb08adabf15e1e ('Fix TK configuration to the
driver in EAPOL-Key 3/4 retry case') which did not take into account
possibility of an extra message 1/4 showing up between retries of
message 3/4.

Bug: 65245581
Test: Wifi Integration suite
Change-Id: If3e736da9a822635551b72074e8f7c3f4d921e87
Merged-In: If3e736da9a822635551b72074e8f7c3f4d921e87
Signed-off-by: Mathy Vanhoef <>
Signed-off-by: Glen Kuhne <>
3 files changed