UPSTREAM: 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.

BUG=b:67040862
TEST=Tested manually on Gale by disabling the ap-group-monitor in
     Root node. Compiled successfully.

Change-Id: I2fb9038cb70862862e4f68554b004f9b36322dee
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
Signed-off-by: Sharanbasappa Sali <sharanbasappa.sali@globaledgesoft.com>
Reviewed-on: https://chromium-review.googlesource.com/718797
Commit-Ready: Julan Hsu <julanhsu@google.com>
Tested-by: Julan Hsu <julanhsu@google.com>
Reviewed-by: Julan Hsu <julanhsu@google.com>
3 files changed