mac80211: fix rx->key NULL dereference during mic failure
Sometimes when reporting a MIC failure rx->key may be unset. This code path is hit when receiving a packet meant for a multicast address, and decryption is performed in HW. Fortunately, the failing key_idx is not used for anything up to (and including) usermode, so we allow ourselves to drop it on the way up when a key cannot be retrieved. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
8fcbd4dc7a
commit
a66b98db57
@@ -6463,7 +6463,8 @@ void nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
|
||||
if (addr)
|
||||
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
|
||||
NLA_PUT_U32(msg, NL80211_ATTR_KEY_TYPE, key_type);
|
||||
NLA_PUT_U8(msg, NL80211_ATTR_KEY_IDX, key_id);
|
||||
if (key_id != -1)
|
||||
NLA_PUT_U8(msg, NL80211_ATTR_KEY_IDX, key_id);
|
||||
if (tsc)
|
||||
NLA_PUT(msg, NL80211_ATTR_KEY_SEQ, 6, tsc);
|
||||
|
||||
|
Reference in New Issue
Block a user