[Pkg-fedora-ds-maintainers] Bug#873120: 389-ds-base: FTBFS on various architectures: test_plugin_pwdstorage_pbkdf2_rounds fails

James Cowgill jcowgill at debian.org
Thu Aug 24 17:34:04 UTC 2017


Source: 389-ds-base
Version: 1.3.6.7-2
Severity: serious
Tags: sid buster

Hi,

389-ds-base FTBFS on various architectures (including armel, i386 and
mips) with this error:
> [==========] Running 3 test(s).
> [ RUN      ] test_plugin_hello
> [       OK ] test_plugin_hello
> [ RUN      ] test_plugin_pwdstorage_pbkdf2_auth
> [       OK ] test_plugin_pwdstorage_pbkdf2_auth
> [ RUN      ] test_plugin_pwdstorage_pbkdf2_rounds
> [  ERROR   ] --- pbkdf2_sha256_calculate_iterations(100000000) == 20000
> [   LINE   ] --- ../test/plugins/pwdstorage/pbkdf2.c:70: error: Failure!
> [  FAILED  ] test_plugin_pwdstorage_pbkdf2_rounds
> [==========] 3 test(s) run.
> [  PASSED  ] 2 test(s).
> [  FAILED  ] 1 test(s), listed below:
> [  FAILED  ] test_plugin_pwdstorage_pbkdf2_rounds

This happens because the prototype of the
pbkdf2_sha256_calculate_iterations function:
> ldap/servers/plugins/pwdstorage/pwdstorage.h
> 95:PRUint32 pbkdf2_sha256_calculate_iterations();

does not match the type of the definition:
> ldap/servers/plugins/pwdstorage/pbkdf2_pwd.c
> 261:pbkdf2_sha256_calculate_iterations(uint64_t time_nsec)

When the test calls this function with an integer argument, the "default
integer promotions" will apply promoting it to an int. Therefore on
every architecture where int != uint64_t (pretty much everything), this
function call will invoke undefined behavior by having the wrong
argument types.

Thanks,
James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-fedora-ds-maintainers/attachments/20170824/750c7b8f/attachment.sig>


More information about the Pkg-fedora-ds-maintainers mailing list