Fix data buffer size in GCMTest.ABI
This test used a data buffer of size 16*32, but calls the assembly
functions with lengths of up to 16*32+7. This was okay for
aesni_gcm_{en,de}crypt which round the length down to a multiple of 16.
But aes_gcm_{enc,dec}_update_vaes_avx10_{256,512} process the full
length, which caused a buffer overrun. Fix this.
Change-Id: Ib3651a38baff35cfd9624d24747a4e53cefe6cff
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/74507
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/crypto/fipsmodule/modes/gcm_test.cc b/crypto/fipsmodule/modes/gcm_test.cc
index ebcfcbe..fafde9c 100644
--- a/crypto/fipsmodule/modes/gcm_test.cc
+++ b/crypto/fipsmodule/modes/gcm_test.cc
@@ -29,7 +29,7 @@
UINT64_C(0x884cfa59ca342b2e),
};
static const size_t kBlockCounts[] = {1, 2, 3, 4, 5, 6, 7, 8, 15, 16, 31, 32};
- uint8_t buf[16 * 32];
+ uint8_t buf[16 * 32 + 7];
OPENSSL_memset(buf, 42, sizeof(buf));
uint8_t X[16] = {0x92, 0xa3, 0xb3, 0x60, 0xce, 0xda, 0x88, 0x03,