]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: don't compare TKIP TX MIC key in reinstall prevention
authorJohannes Berg <johannes.berg@intel.com>
Tue, 24 Oct 2017 19:12:13 +0000 (21:12 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 25 Oct 2017 09:04:45 +0000 (11:04 +0200)
commita02e8b87f0bc4b9bf815047ab1c3ce16a11ae585
tree5bdf986177e4800adf4dd1766fac1f2f673c57d6
parenta493ffb811509e767b9245a5567ecb3554efd18b
mac80211: don't compare TKIP TX MIC key in reinstall prevention

For the reinstall prevention, the code I had added compares the
whole key. It turns out though that iwlwifi firmware doesn't
provide the TKIP TX MIC key as it's not needed in client mode,
and thus the comparison will always return false.

For client mode, thus always zero out the TX MIC key part before
doing the comparison in order to avoid accepting the reinstall
of the key with identical encryption and RX MIC key, but not the
same TX MIC key (since the supplicant provides the real one.)

Fixes: 7f21c3d216d8 ("mac80211: accept key reinstall without changing anything")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/key.c