Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151330654
D33012.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
642 B
Referenced Files
None
Subscribers
None
D33012.id.diff
View Options
diff --git a/sys/crypto/aesni/aesni_ghash.c b/sys/crypto/aesni/aesni_ghash.c
--- a/sys/crypto/aesni/aesni_ghash.c
+++ b/sys/crypto/aesni/aesni_ghash.c
@@ -504,9 +504,10 @@
}
tmp1 = _mm_aesenc_si128(tmp1, KEY[nr-1]);
tmp1 = _mm_aesenclast_si128(tmp1, KEY[nr]);
- tmp1 = _mm_xor_si128(tmp1,
- _mm_loadu_si128(&((const __m128i *)in)[k]));
- last_block = tmp1;
+ last_block = _mm_setzero_si128();
+ memcpy(&last_block, &((const __m128i *)in)[k],
+ nbytes % 16);
+ last_block = _mm_xor_si128(last_block, tmp1);
for (j=0; j<nbytes%16; j++)
out[k*16+j] = ((unsigned char*)&last_block)[j];
for ((void)j; j<16; j++)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 3:53 PM (8 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31072071
Default Alt Text
D33012.id.diff (642 B)
Attached To
Mode
D33012: aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt()
Attached
Detach File
Event Timeline
Log In to Comment