[openssl-dev] [openssl.org #4679] Bug: The 'test4' in openssl-1.0.2h/test/hmactest.c dumped core in FIPS mode
Ziyan Zhou via RT
rt at openssl.org
Tue Sep 20 10:38:22 UTC 2016
Hi,
When I was trying run the test code openssl-1.0.2h/test/hmactest.c in
FIPS mode, I got SIGSEGV.
I did following changes to run it in FIPS mode.
a) Added FIPS_mode_set(1);
b) Commented out the test 1 ~ test 3 since MD5 is not supported in FIPS
mode.
c) I renamed hmactest.c to hmactest_changed_for_test4_in_fips.c
OpenSSL version: 1.0.2h
OpenSSL FIPS version: 2.0.12
OS: CentOS 6.7
I compiled it like this:
# gcc -I /usr/local/ssl/include/ -L /usr/local/ssl/lib/ -lcrypto
-Wl,-rpath=/usr/local/ssl/lib/ hmactest_changed_for_test4_in_fips.c
(The e_os.h is at same directory with hmactest.c)
Output from gdb:
(gdb)
192 if (HMAC_Init_ex(&ctx, NULL, 0, NULL, NULL)) {
(gdb)
197 if (HMAC_Update(&ctx, test[4].data, test[4].data_len)) {
(gdb)
Program received signal SIGSEGV, Segmentation fault.
This issue could be reproduced with the attached
hmactest_changed_for_test4_in_fips.c
Thanks,
Ziyan
--
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4679
Please log in as guest with password guest if prompted
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hmactest_changed_for_test4_in_fips.c
Type: text/x-csrc
Size: 11728 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20160920/e704f734/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3707 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20160920/e704f734/attachment-0001.bin>
More information about the openssl-dev
mailing list