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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to