Discussion:
FIPS 1.2.4 and OpenSSL 0.9.8zc Fails 'make test'
Russell Selph
2014-10-15 21:33:39 UTC
Permalink
Apologies if this is a duplicate post. I tried first via Google Groups, but apparently it's read-only. ;-)

Has anyone else built 0.9.8zc with FIPS 1.2.4? I've been unable to get a build that passes the 'make test' phase. I'm using build scripts that worked for 0.9.8.zb. (More details on the scripts below.) This is happening on Linux RHEL5 (gcc 4.1.2), Mac OS X 10.9.5 (Xcode 6.0.1), as well as Windows 7 (VS 2010).

Off hand, it seems like this kind of failure could be accounted for by something fundamental, such as an incompatible API change in libcrypto, or a word size mismatch between the FIPS and the libssl builds. I'm about to start digging through the diffs to get a handle on this, but I was wondering if I'm alone in having this problem. Any information about experiences positive or negative would be very helpful.

-russ

The *nix test failure looks like this:
====================================================
...
verify BN_GF2m_mod_solve_quad
2220 tests passed
test a^b%c implementations
../util/shlib_wrap.sh ./exptest
........................................................................................................................................................................................................
1**0 mod 1 = 1, should be 0
make[1]: *** [test_bn] Error 1
make[1]: Leaving directory `/var/tmp/opensll/openssl-0.9.8zc/test'
make: *** [tests] Error 2
OpenSSL self test failed
====================================================

While the Windows failure looks basically the same, but seems to occur in a different part of the test sequence:
====================================================
...
exptest
....................................................................................................................................
....................................................................
1**0 mod 1 = 1, should be 0
problems.....
====================================================

BUILD DETAILS:
The build scripts I use try to capture the whole process of the build from un-taring the distribution to the 'make install', so I can maintain consistency between platforms and versions. If anyone is interested enough, I'll be happy to supply them, but I'll give the highlights here:

- Clear out the directory
- Untar the FIPS distribution (openssl-fips-1.2.4.tar.gz)
- ./config fipscanisterbuild ; make ; make install
- Unpack latest OpenSSL 0.9.8 (openssl-0.9.8zc.tar.gz)
- ./Configure threads shared fips --prefix=${openssl_install} linux-x86_64|darwin64-x86_64-cc
- make depend ; make ; make test ; make install_sw

(Of course, on Windows the build script looks quite a bit different, but the net effect is the same, so I'm assuming the differences are irrelevant for now.)

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2014-10-16 15:29:26 UTC
Permalink
Post by Russell Selph
Apologies if this is a duplicate post. I tried first via Google Groups, but
apparently it's read-only. ;-)
Has anyone else built 0.9.8zc with FIPS 1.2.4? I've been unable to get a
build that passes the 'make test' phase. I'm using build scripts that
worked for 0.9.8.zb. (More details on the scripts below.) This is
happening on Linux RHEL5 (gcc 4.1.2), Mac OS X 10.9.5 (Xcode 6.0.1), as well
as Windows 7 (VS 2010).
Off hand, it seems like this kind of failure could be accounted for by
something fundamental, such as an incompatible API change in libcrypto, or a
word size mismatch between the FIPS and the libssl builds. I'm about to
start digging through the diffs to get a handle on this, but I was wondering
if I'm alone in having this problem. Any information about experiences
positive or negative would be very helpful.
The cause is a sanity check in exptest that x ** 0 mod 1 == 0.

The BN library in OpenSSL itself was fixed to cover this case but the FIPS
capable OpenSSL uses the BN library in the 1.2.x FIPS module which can't be
fixed. See commit:

45d129511ff0b43be9a4271133c9ee22658ff07e

This doesn't affect the normal operation of the FIPS modules so it can be
ignored.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Russell Selph
2014-10-16 15:37:41 UTC
Permalink
Thanks. We're going ahead with patching 0.9.8zc to ignore this test. I'm not sure if it's the "right" solution, but given that 0.9.8 is EOL, and therefore FIPS 1.2.4 is VERY unlikely to ever be updated, would it be reasonable to have 0.9.8 disable this test when doing a FIPS build?

I only ask this because our customers are not generally comfortable with statements like "You can't have FIPS any more," or "It passes all the tests but one." I'd be happy to put together the patch to accomplish this, if it could be incorporated into the trunk for 0.9.8.

Thanks again for you help!

-russ
Post by Russell Selph
Apologies if this is a duplicate post. I tried first via Google Groups, but
apparently it's read-only. ;-)
Has anyone else built 0.9.8zc with FIPS 1.2.4? I've been unable to get a
build that passes the 'make test' phase. I'm using build scripts that
worked for 0.9.8.zb. (More details on the scripts below.) This is
happening on Linux RHEL5 (gcc 4.1.2), Mac OS X 10.9.5 (Xcode 6.0.1), as well
as Windows 7 (VS 2010).
Off hand, it seems like this kind of failure could be accounted for by
something fundamental, such as an incompatible API change in libcrypto, or a
word size mismatch between the FIPS and the libssl builds. I'm about to
start digging through the diffs to get a handle on this, but I was wondering
if I'm alone in having this problem. Any information about experiences
positive or negative would be very helpful.
The cause is a sanity check in exptest that x ** 0 mod 1 == 0.

The BN library in OpenSSL itself was fixed to cover this case but the FIPS
capable OpenSSL uses the BN library in the 1.2.x FIPS module which can't be
fixed. See commit:

45d129511ff0b43be9a4271133c9ee22658ff07e

This doesn't affect the normal operation of the FIPS modules so it can be
ignored.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2014-10-16 16:38:09 UTC
Permalink
Post by Russell Selph
Thanks. We're going ahead with patching 0.9.8zc to ignore this test. I'm
not sure if it's the "right" solution, but given that 0.9.8 is EOL, and
therefore FIPS 1.2.4 is VERY unlikely to ever be updated, would it be
reasonable to have 0.9.8 disable this test when doing a FIPS build?
It will never be updated. Fixing it would at least require a change letter for
obsolete code and I suspect the labs wouldn't be able to approve a change to
something that old. Changing BN might be considered "security sensitive" which
would mean even that ridiculously unlikely route would be impossible.
Post by Russell Selph
I only ask this because our customers are not generally comfortable with
statements like "You can't have FIPS any more," or "It passes all the tests
but one." I'd be happy to put together the patch to accomplish this, if it
could be incorporated into the trunk for 0.9.8.
No need. I'm looking into it.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Emilia Käsper
2014-10-16 16:22:40 UTC
Permalink
Yes, I think that's a reasonable solution. The new test was added together
with the bugfix as a regression test. Disabling it would bring you back to
the earlier state without any further regression.

Cheers,
Emilia
Post by Russell Selph
Thanks. We're going ahead with patching 0.9.8zc to ignore this test. I'm
not sure if it's the "right" solution, but given that 0.9.8 is EOL, and
therefore FIPS 1.2.4 is VERY unlikely to ever be updated, would it be
reasonable to have 0.9.8 disable this test when doing a FIPS build?
I only ask this because our customers are not generally comfortable with
statements like "You can't have FIPS any more," or "It passes all the tests
but one." I'd be happy to put together the patch to accomplish this, if it
could be incorporated into the trunk for 0.9.8.
Thanks again for you help!
-russ
Post by Russell Selph
Apologies if this is a duplicate post. I tried first via Google Groups,
but
Post by Russell Selph
apparently it's read-only. ;-)
Has anyone else built 0.9.8zc with FIPS 1.2.4? I've been unable to get a
build that passes the 'make test' phase. I'm using build scripts that
worked for 0.9.8.zb. (More details on the scripts below.) This is
happening on Linux RHEL5 (gcc 4.1.2), Mac OS X 10.9.5 (Xcode 6.0.1), as
well
Post by Russell Selph
as Windows 7 (VS 2010).
Off hand, it seems like this kind of failure could be accounted for by
something fundamental, such as an incompatible API change in libcrypto,
or a
Post by Russell Selph
word size mismatch between the FIPS and the libssl builds. I'm about to
start digging through the diffs to get a handle on this, but I was
wondering
Post by Russell Selph
if I'm alone in having this problem. Any information about experiences
positive or negative would be very helpful.
The cause is a sanity check in exptest that x ** 0 mod 1 == 0.
The BN library in OpenSSL itself was fixed to cover this case but the FIPS
capable OpenSSL uses the BN library in the 1.2.x FIPS module which can't be
45d129511ff0b43be9a4271133c9ee22658ff07e
This doesn't affect the normal operation of the FIPS modules so it can be
ignored.
Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Loading...