Hi Howard,
Thanks for the pointer. --enable-lmpasswd was indeed enabled in the
FreeBSD port. Notifying maintainer of port to switch it off and
provided a patch for the port.
Hope the patch I created for OpenLDAP is usable after all! Deprecated
code in a function that should not be used, would it not be better to
remove it completely? (or is that violating the RFCs?)
Kind regards,
Bernard.
On Wed, Nov 5, 2014 at 5:48 PM, Howard Chu <hyc(a)symas.com> wrote:
> spil.oss(a)gmail.com wrote:
>>
>> Full_Name: Bernard Spil
>> Version: 2.4.40
>> OS: FreeBSD 10.1-RC2
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (185.9.255.20)
>>
>>
>> When compiling OpenLDAP against the LibreSSL OpenSSL fork, compilation
>> fails
>> because deprecated types and functions are used. These types and functions
>> have
>> been marked deprecated by OpenSSL since 2002 and moved from des.h to
>> des_old.h.
>> LibreSSL removed these deprecated types and functions in April 2014 see
>>
>> https://github.com/libressl-portable/openbsd/commit/e0d211052a6946b9f8af112…
>>
>>> From the make output:
>
>
> It appears you're compiling with the old LANMAN hash support. Nobody should
> be using LANMAN any more, it's trivially insecure. I'm inclined to ignore
> this ITS.
>>
>>
>> --- passwd.o ---
>> passwd.c:41:9: error: unknown type name 'des_cblock'; did you mean
>> 'DES_cblock'?
>> typedef des_cblock des_key;
>> ^~~~~~~~~~
>> DES_cblock
>> /usr/local/include/openssl/des.h:73:23: note: 'DES_cblock' declared here
>> typedef unsigned char DES_cblock[8];
>> ^
>> passwd.c:42:9: erro3A3A unknown type name 'des_cblock'; did you mean
>> 'DES_cblock'?
>> typedef des_cblock des_data_block;
>> ^~~~~~~~~~
>> DES_cblock
>> /usr/local/include/openssl/des.h:73:23: note: 'DES_cblock' declared here
>> typedef unsigned char DES_cblock[8];
>> ^
>> passwd.c:43:9: error: unknown type name 'des_key_schedule'; did you mean
>> 'DES_key_schedule'?
>> typedef des_key_schedule des_context;
>> ^~~~~~~~~~~~~~~~
>> DES_key_schedule
>> /usr/local/include/openssl/des.h:87:7: note: 'DESeyey_schedule' declared
>> here
>> } DES_key_schedule;
>> ^
>> passwd.c:670:5: warning: implicit declaration of function
>> 'des_set_odd_parity'
>> is invalid in C99 [-Wimplicit-function-declaration]
>> des_set_odd_parity( key );
>> ^
>> passwd.c:867:2: warningA imimplicit declaration of function
>> 'des_set_key_unchecked' is invalid in C99
>> [-Wimplicit-function-declaration]
>> des_set_key_unchecked( &key, schedule );
>> ^
>> passwd.c:868:2: warning: implicit declaration of function
>> 'des_ecb_encrypt' is
>> invalid in C99 [-Wimplicit-function-declaration]
>> des_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT
>> );
>> ^
>> 3 warnings and 3 errors generated.
>> *** [passwd.o] Error code 1
>>
>> make[4]: stopped in
>> /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries/liblutil
>> 1 error
>>
>> make[4]: stopped in
>> /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries/liblutil
>> *** [all-common] Error code 2
>>
>> make[3]: stopped in
>> /usr/ports/net/openldap24-server/work/openldap-2.4.40/librars%s
>> 1 error
>>
>> make[3]: stopped in
>> /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries
>> *** [all-common] Error code 2
>>
>> make[2]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40
>> 1 error
>>
>> make[2]: stopped in /u%2/ports/net/openldap24-server/work/openldap-2.4.40
>> ===> Compilation failed unexpectedly.
>> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure
>> to
>> the maintainer.
>> *** Error code 1
>>
>> Stop.
>>
>>
>>
>
>
> --
> -- Howard Chu
> CTO, Symas Corp. http://www.symas.com
> Director, Highland Sun http://highlandsun.com/hyc/
> Chief Architect, OpenLDAP http://www.openldap.org/project/
spil.oss(a)gmail.com wrote:
> Full_Name: Bernard Spil
> Version: 2.4.40
> OS: FreeBSD 10.1-RC2
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (185.9.255.20)
>
>
> When compiling OpenLDAP against the LibreSSL OpenSSL fork, compilation fails
> because deprecated types and functions are used. These types and functions have
> been marked deprecated by OpenSSL since 2002 and moved from des.h to des_old.h.
> LibreSSL removed these deprecated types and functions in April 2014 see
> https://github.com/libressl-portable/openbsd/commit/e0d211052a6946b9f8af112…
>
>>From the make output:
It appears you're compiling with the old LANMAN hash support. Nobody should be
using LANMAN any more, it's trivially insecure. I'm inclined to ignore this ITS.
>
> --- passwd.o ---
> passwd.c:41:9: error: unknown type name 'des_cblock'; did you mean
> 'DES_cblock'?
> typedef des_cblock des_key;
> ^~~~~~~~~~
> DES_cblock
> /usr/local/include/openssl/des.h:73:23: note: 'DES_cblock' declared here
> typedef unsigned char DES_cblock[8];
> ^
> passwd.c:42:9: erro3A3A unknown type name 'des_cblock'; did you mean
> 'DES_cblock'?
> typedef des_cblock des_data_block;
> ^~~~~~~~~~
> DES_cblock
> /usr/local/include/openssl/des.h:73:23: note: 'DES_cblock' declared here
> typedef unsigned char DES_cblock[8];
> ^
> passwd.c:43:9: error: unknown type name 'des_key_schedule'; did you mean
> 'DES_key_schedule'?
> typedef des_key_schedule des_context;
> ^~~~~~~~~~~~~~~~
> DES_key_schedule
> /usr/local/include/openssl/des.h:87:7: note: 'DESeyey_schedule' declared here
> } DES_key_schedule;
> ^
> passwd.c:670:5: warning: implicit declaration of function 'des_set_odd_parity'
> is invalid in C99 [-Wimplicit-function-declaration]
> des_set_odd_parity( key );
> ^
> passwd.c:867:2: warningA imimplicit declaration of function
> 'des_set_key_unchecked' is invalid in C99 [-Wimplicit-function-declaration]
> des_set_key_unchecked( &key, schedule );
> ^
> passwd.c:868:2: warning: implicit declaration of function 'des_ecb_encrypt' is
> invalid in C99 [-Wimplicit-function-declaration]
> des_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT );
> ^
> 3 warnings and 3 errors generated.
> *** [passwd.o] Error code 1
>
> make[4]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries/liblutil
> 1 error
>
> make[4]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries/liblutil
> *** [all-common] Error code 2
>
> make[3]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/librars%s
> 1 error
>
> make[3]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries
> *** [all-common] Error code 2
>
> make[2]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40
> 1 error
>
> make[2]: stopped in /u%2/ports/net/openldap24-server/work/openldap-2.4.40
> ===> Compilation failed unexpectedly.
> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
> the maintainer.
> *** Error code 1
>
> Stop.
>
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Full_Name: Bernard Spil
Version: 2.4.40
OS: FreeBSD 10.1-RC2
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (185.9.255.20)
When compiling OpenLDAP against the LibreSSL OpenSSL fork, compilation fails
because deprecated types and functions are used. These types and functions have
been marked deprecated by OpenSSL since 2002 and moved from des.h to des_old.h.
LibreSSL removed these deprecated types and functions in April 2014 see
https://github.com/libressl-portable/openbsd/commit/e0d211052a6946b9f8af112…
>From the make output:
--- passwd.o ---
passwd.c:41:9: error: unknown type name 'des_cblock'; did you mean
'DES_cblock'?
typedef des_cblock des_key;
^~~~~~~~~~
DES_cblock
/usr/local/include/openssl/des.h:73:23: note: 'DES_cblock' declared here
typedef unsigned char DES_cblock[8];
^
passwd.c:42:9: erro3A3A unknown type name 'des_cblock'; did you mean
'DES_cblock'?
typedef des_cblock des_data_block;
^~~~~~~~~~
DES_cblock
/usr/local/include/openssl/des.h:73:23: note: 'DES_cblock' declared here
typedef unsigned char DES_cblock[8];
^
passwd.c:43:9: error: unknown type name 'des_key_schedule'; did you mean
'DES_key_schedule'?
typedef des_key_schedule des_context;
^~~~~~~~~~~~~~~~
DES_key_schedule
/usr/local/include/openssl/des.h:87:7: note: 'DESeyey_schedule' declared here
} DES_key_schedule;
^
passwd.c:670:5: warning: implicit declaration of function 'des_set_odd_parity'
is invalid in C99 [-Wimplicit-function-declaration]
des_set_odd_parity( key );
^
passwd.c:867:2: warningA imimplicit declaration of function
'des_set_key_unchecked' is invalid in C99 [-Wimplicit-function-declaration]
des_set_key_unchecked( &key, schedule );
^
passwd.c:868:2: warning: implicit declaration of function 'des_ecb_encrypt' is
invalid in C99 [-Wimplicit-function-declaration]
des_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT );
^
3 warnings and 3 errors generated.
*** [passwd.o] Error code 1
make[4]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries/liblutil
1 error
make[4]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries/liblutil
*** [all-common] Error code 2
make[3]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/librars%s
1 error
make[3]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries
*** [all-common] Error code 2
make[2]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40
1 error
make[2]: stopped in /u%2/ports/net/openldap24-server/work/openldap-2.4.40
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Stop.
Tsukasa HAMANO wrote:
> Hi, Howard
>
> At Wed, 05 Nov 2014 09:32:43 +0000,
> Howard Chu wrote:
>>
>> Any particular reason you've decreased the iterations from 60000 to 10000?
>>
>
> It was too slow when stretching 60000 on powerless server.
> My tiny VM needed over 1sec if iterate 60000 by PBKDF2-SHA512.
> RFC recommends more than 1000 iterations, it would be safe enough 10000 iterations.
> FYI: http://security.stackexchange.com/questions/3959/recommended-of-iterations-…
OK. I've committed it without any changes, thanks for the patch.
> It is desirable to be able to change the operator, but slapasswd does
> not read slapd.conf so I was stuck.
> I'm planning to change slappasswd that accept iteration count in the future.
> Thank you.
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Hi, Howard
At Wed, 05 Nov 2014 09:32:43 +0000,
Howard Chu wrote:
>
> Any particular reason you've decreased the iterations from 60000 to 10000?
>
It was too slow when stretching 60000 on powerless server.
My tiny VM needed over 1sec if iterate 60000 by PBKDF2-SHA512.
RFC recommends more than 1000 iterations, it would be safe enough 10000 iterations.
FYI: http://security.stackexchange.com/questions/3959/recommended-of-iterations-…
It is desirable to be able to change the operator, but slapasswd does
not read slapd.conf so I was stuck.
I'm planning to change slappasswd that accept iteration count in the future.
Thank you.
--
Open Source Solution Technology Corporation
HAMANO Tsukasa <hamano(a)osstech.co.jp>
fingerprint = 2285 2111 6D34 3816 3C2E A5B9 16BE D101 6069 BE55
hamano(a)osstech.co.jp wrote:
> Full_Name: HAMANO Tsukasa
> Version: git master
> OS: GNU/Linux
> URL: https://www.osstech.co.jp/download/hamano/openldap-pbkdf2_sha2.patch
> Submission from: (NULL) (240b:10:2640:bf0:426c:8fff:fe50:23a8)
>
>
> I've supported new schemes PBKDF2-SHA256 and PBKDF2-SHA512.
> Thank you.
Any particular reason you've decreased the iterations from 60000 to 10000?
>
> --
> The attached patch file is derived from OpenLDAP Software. All of the
> modifications to OpenLDAP Software represented in the following
> patch(es) were developed by HAMANO Tsukasa <hamano(a)osstech.co.jp>. I
> have not assigned rights and/or interest in this work to any party.
>
> Copyright 2014 HAMANO Tsukasa <hamano(a)osstech.co.jp>
> Redistribution and use in source and binary forms, with or without
> modification, e e permitted only as authorized by the OpenLDAP Public
> License.
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Full_Name: HAMANO Tsukasa
Version: git master
OS: GNU/Linux
URL: https://www.osstech.co.jp/download/hamano/openldap-pbkdf2_sha2.patch
Submission from: (NULL) (240b:10:2640:bf0:426c:8fff:fe50:23a8)
I've supported new schemes PBKDF2-SHA256 and PBKDF2-SHA512.
Thank you.
--
The attached patch file is derived from OpenLDAP Software. All of the
modifications to OpenLDAP Software represented in the following
patch(es) were developed by HAMANO Tsukasa <hamano(a)osstech.co.jp>. I
have not assigned rights and/or interest in this work to any party.
Copyright 2014 HAMANO Tsukasa <hamano(a)osstech.co.jp>
Redistribution and use in source and binary forms, with or without
modification, e e permitted only as authorized by the OpenLDAP Public
License.
mwarren(a)symas.com wrote:
> Full_Name: Mark Warren
> Version: 2.4.32
> OS: RHEL
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (72.35.133.119)
>
>
>
> via Howard:
>
> "The bug is syncrepl.c lines 2036-2038. Returning LDAP_SUCCESS here
> short-circuits the overlay stack and *doesn't* call the cleanup handlers."
>
> Note: The line numbers are skewed as we're working with an older version.
On further analysis, it appears the patch is not needed in current code. It
seems the problem (an incoming mod whose entryCSN matches the existing
entryCSN of the target entry) was already avoided by the patch for ITS#7427,
which was released in 2.4.34.
Definitely unable to reproduce the issue in 2.4.40.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Full_Name: Mark Warren
Version: 2.4.32
OS: RHEL
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (72.35.133.119)
via Howard:
"The bug is syncrepl.c lines 2036-2038. Returning LDAP_SUCCESS here
short-circuits the overlay stack and *doesn't* call the cleanup handlers."
Note: The line numbers are skewed as we're working with an older version.
Best Regards,
Mark