mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 19:20:50 +07:00
mac80211: avoid NULL ptr deref when using WEP
"mac80211: move control.hw_key assignment" changed an if-else into two separate if statments, but the if-else is needed to prevent dereferencing a null info->control.hw_key. This fixes avoids a lock-up during association on my machine when using WEP. Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
64147c7297
commit
e4fca007b0
@ -310,9 +310,8 @@ static int wep_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
|
|||||||
tx->key->conf.keylen,
|
tx->key->conf.keylen,
|
||||||
tx->key->conf.keyidx))
|
tx->key->conf.keyidx))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
} else if (info->control.hw_key->flags &
|
||||||
|
IEEE80211_KEY_FLAG_GENERATE_IV) {
|
||||||
if (info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV) {
|
|
||||||
if (!ieee80211_wep_add_iv(tx->local, skb,
|
if (!ieee80211_wep_add_iv(tx->local, skb,
|
||||||
tx->key->conf.keylen,
|
tx->key->conf.keylen,
|
||||||
tx->key->conf.keyidx))
|
tx->key->conf.keyidx))
|
||||||
|
Loading…
Reference in New Issue
Block a user