diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2017-03-23 04:10:11 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2017-03-23 04:10:11 +0000 |
commit | 1ce3485cc04e74a61ec9e3553378c1971bdb859d (patch) | |
tree | d9de02e01bf97d7f8bde3af8afc36e0ee910a8b6 /sys/net80211/ieee80211_crypto_bip.c | |
parent | d01ea33a92b1235261b61f0b0f85e8a44a117a13 (diff) |
Use explicit_bzero() to wipe out key material and add some sizes to free().
ok stsp
Diffstat (limited to 'sys/net80211/ieee80211_crypto_bip.c')
-rw-r--r-- | sys/net80211/ieee80211_crypto_bip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_crypto_bip.c b/sys/net80211/ieee80211_crypto_bip.c index 6ab5fb676bf..307c05b1bce 100644 --- a/sys/net80211/ieee80211_crypto_bip.c +++ b/sys/net80211/ieee80211_crypto_bip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto_bip.c,v 1.7 2015/11/24 13:45:06 mpi Exp $ */ +/* $OpenBSD: ieee80211_crypto_bip.c,v 1.8 2017/03/23 04:10:10 tb Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr> @@ -68,8 +68,10 @@ ieee80211_bip_set_key(struct ieee80211com *ic, struct ieee80211_key *k) void ieee80211_bip_delete_key(struct ieee80211com *ic, struct ieee80211_key *k) { - if (k->k_priv != NULL) - free(k->k_priv, M_DEVBUF, 0); + if (k->k_priv != NULL) { + explicit_bzero(k->k_priv, sizeof(struct ieee80211_bip_ctx)); + free(k->k_priv, M_DEVBUF, sizeof(struct ieee80211_bip_ctx)); + } k->k_priv = NULL; } |