]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Nov 2017 10:06:29 +0000 (11:06 +0100)
commit241d7ab103703ef4060ff205aed0643378d013a1
tree26a80dc29c5202e358b8383fd23434731aef561f
parent32025b5c58605cdc0552d7976d010f10fa13f28a
mac80211: don't compare TKIP TX MIC key in reinstall prevention

commit cfbb0d90a7abb289edc91833d0905931f8805f12 upstream.

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: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/key.c