aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/key.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-06 16:00:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-08 11:11:20 -0400
commit75396ae6d433b49482e377e6f8dbf1f42ad53f3a (patch)
tree07fb506f08f3cca7d67d2fd365cc059240b6957b /net/mac80211/key.h
parentaba83a0b301c32dbb91c017f33307611e1a1d384 (diff)
mac80211: fix CMAC races
Just like TKIP and CCMP, CMAC has the PN race. It might not actually be possible to hit it now since there aren't multiple ACs for management frames, but fix it anyway. Also move scratch buffers onto the stack. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/key.h')
-rw-r--r--net/mac80211/key.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mac80211/key.h b/net/mac80211/key.h
index 05ce4c0203f..fcb52eb2f92 100644
--- a/net/mac80211/key.h
+++ b/net/mac80211/key.h
@@ -97,14 +97,11 @@ struct ieee80211_key {
97#endif 97#endif
98 } ccmp; 98 } ccmp;
99 struct { 99 struct {
100 u8 tx_pn[6]; 100 atomic64_t tx_pn;
101 u8 rx_pn[6]; 101 u8 rx_pn[6];
102 struct crypto_cipher *tfm; 102 struct crypto_cipher *tfm;
103 u32 replays; /* dot11RSNAStatsCMACReplays */ 103 u32 replays; /* dot11RSNAStatsCMACReplays */
104 u32 icverrors; /* dot11RSNAStatsCMACICVErrors */ 104 u32 icverrors; /* dot11RSNAStatsCMACICVErrors */
105 /* scratch buffers for virt_to_page() (crypto API) */
106 u8 tx_crypto_buf[2 * AES_BLOCK_LEN];
107 u8 rx_crypto_buf[2 * AES_BLOCK_LEN];
108 } aes_cmac; 105 } aes_cmac;
109 } u; 106 } u;
110 107