mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Cc: [email protected] Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
8fcbd4dc7a
commit
a66b98db57
3 changed files with 10 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue