summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_crypto_bip.c
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-20 15:36:04 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-20 15:36:04 +0000
commitf95bf0159b9d317656e04f36a7b45f5984a04918 (patch)
treead30ebd92f81eada1f3fafedd81cc6fbf3209fa4 /sys/net80211/ieee80211_crypto_bip.c
parentc423123010a4d3b4ee7bbd318a9d01bad08b80a2 (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_bip.c')
-rw-r--r--sys/net80211/ieee80211_crypto_bip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_crypto_bip.c b/sys/net80211/ieee80211_crypto_bip.c
index efa96835521..b69fac41d73 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.2 2009/01/26 19:09:41 damien Exp $ */
+/* $OpenBSD: ieee80211_crypto_bip.c,v 1.3 2010/07/20 15:36:03 matthew Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -201,7 +201,7 @@ ieee80211_bip_decap(struct ieee80211com *ic, struct mbuf *m0,
AES_CMAC_Final(mic, &ctx->cmac);
/* check that MIC matches the one in MMIE */
- if (memcmp(mic, mic0, 8) != 0) {
+ if (timingsafe_bcmp(mic, mic0, 8) != 0) {
ic->ic_stats.is_cmac_icv_errs++;
m_freem(m0);
return NULL;