cfg80211: clear wext keys when freeing and removing them
When freeing the keys stored for wireless extensions, clear the memory to avoid having the key material stick around in memory "forever". Similarly, when userspace overwrites a key, actually clear it instead of just setting the key length to zero. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -1007,7 +1007,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
|
||||
rdev->devlist_generation++;
|
||||
cfg80211_mlme_purge_registrations(wdev);
|
||||
#ifdef CONFIG_CFG80211_WEXT
|
||||
kfree(wdev->wext.keys);
|
||||
kzfree(wdev->wext.keys);
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user