Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160265777
D33474.id100096.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
884 B
Referenced Files
None
Subscribers
None
D33474.id100096.diff
View Options
Index: sys/crypto/aesni/aesni_ghash.c
===================================================================
--- sys/crypto/aesni/aesni_ghash.c
+++ sys/crypto/aesni/aesni_ghash.c
@@ -534,7 +534,7 @@
const unsigned char *tag, uint32_t nbytes, uint32_t abytes, int ibytes,
const unsigned char *key, int nr)
{
- int i, j ,k;
+ int i, j, k;
__m128i tmp1, tmp2, tmp3, tmp4;
__m128i tmp5, tmp6, tmp7, tmp8;
__m128i H, H2, H3, H4, Y, T;
@@ -799,8 +799,9 @@
}
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 = _mm_setzero_si128();
+ memcpy(&last_block, &((const __m128i *)in)[k], nbytes%16);
+ tmp1 = _mm_xor_si128(tmp1, last_block);
last_block = tmp1;
for (j=0; j<nbytes%16; j++)
out[k*16+j] = ((unsigned char*)&last_block)[j];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 23, 5:35 PM (11 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34254957
Default Alt Text
D33474.id100096.diff (884 B)
Attached To
Mode
D33474: aesni: Fix yet another out-of-bounds read
Attached
Detach File
Event Timeline
Log In to Comment