Prevent reinstallation of an already in-use group key

Track the current GTK and IGTK that is in use and when receiving a
(possibly retransmitted) Group Message 1 or WNM-Sleep Mode Response, do
not install the given key if it is already in use. This prevents an
attacker from trying to trick the client into resetting or lowering the
sequence counter associated to the group key.

Change-Id: I54f22e16b4fca5c541fd7f7e6cf6c9503e875f4e
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
Signed-off-by: Glen Kuhne <kuh@google.com>
Merged-In: I5a315accb15ca5d2464acc3c370c66e07d57c7ea
Bug: 65245581
Test: WiFi integration tests
(cherry picked from commit 480c21c67806af61aa94b3e49b6a18daf8d428d6)
3 files changed