提交 e4fca007 编写于 作者: J John W. Linville

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: NJohn W. Linville <linville@tuxdriver.com>
上级 64147c72
......@@ -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.keyidx))
return -1;
}
if (info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV) {
} else if (info->control.hw_key->flags &
IEEE80211_KEY_FLAG_GENERATE_IV) {
if (!ieee80211_wep_add_iv(tx->local, skb,
tx->key->conf.keylen,
tx->key->conf.keyidx))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册