diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2010-07-20 15:36:04 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2010-07-20 15:36:04 +0000 |
commit | f95bf0159b9d317656e04f36a7b45f5984a04918 (patch) | |
tree | ad30ebd92f81eada1f3fafedd81cc6fbf3209fa4 /sys/net80211/ieee80211_crypto.c | |
parent | c423123010a4d3b4ee7bbd318a9d01bad08b80a2 (diff) |
Switch some obvious network stack MAC comparisons from bcmp() to
timingsafe_bcmp().
ok deraadt@; committed over WPA.
Diffstat (limited to 'sys/net80211/ieee80211_crypto.c')
-rw-r--r-- | sys/net80211/ieee80211_crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index 64ab098eae5..28afffa824c 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto.c,v 1.58 2009/02/13 17:24:54 damien Exp $ */ +/* $OpenBSD: ieee80211_crypto.c,v 1.59 2010/07/20 15:36:03 matthew Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr> @@ -485,7 +485,7 @@ ieee80211_eapol_key_check_mic(struct ieee80211_eapol_key *key, memset(key->mic, 0, EAPOL_KEY_MIC_LEN); ieee80211_eapol_key_mic(key, kck); - return memcmp(key->mic, mic, EAPOL_KEY_MIC_LEN) != 0; + return timingsafe_bcmp(key->mic, mic, EAPOL_KEY_MIC_LEN) != 0; } #ifndef IEEE80211_STA_ONLY |