提交 29c3f9c3 编写于 作者: J Johannes Berg

mac80211: clear key material when freeing keys

When freeing the key, clear the memory to avoid having the
key material stick around in memory "forever".
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 b47f610b
...@@ -422,7 +422,7 @@ static void ieee80211_key_free_common(struct ieee80211_key *key) ...@@ -422,7 +422,7 @@ static void ieee80211_key_free_common(struct ieee80211_key *key)
ieee80211_aes_key_free(key->u.ccmp.tfm); ieee80211_aes_key_free(key->u.ccmp.tfm);
if (key->conf.cipher == WLAN_CIPHER_SUITE_AES_CMAC) if (key->conf.cipher == WLAN_CIPHER_SUITE_AES_CMAC)
ieee80211_aes_cmac_key_free(key->u.aes_cmac.tfm); ieee80211_aes_cmac_key_free(key->u.aes_cmac.tfm);
kfree(key); kzfree(key);
} }
static void __ieee80211_key_destroy(struct ieee80211_key *key, static void __ieee80211_key_destroy(struct ieee80211_key *key,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册