Hi everyone,
I am trying to do a number of changes into the configuration database using the following ldif entries:
dn: cn=config changetype: modify add: olcTLSCACertificatePath olcTLSCACertificatePath: /etc/ssl/certs - add: olcTLSCertificateFile olcTLSCertificateFile: /etc/openldap/ssl/slapd.cert - add: olcTLSCertificateKeyFile olcTLSCertificateKeyFile: /etc/openldap/ssl/slapd.key - add: olcTLSCipherSuite olcTLSCipherSuite: AES256 - replace: olcTLSVerifyClient olcTLSVerifyClient: allow -
When running the ldapmodify command as follow:
ldapmodify -f tlsmods.ldir -D cn=config -H ldapi:/// -x -W
the slapd process is crashing. I tried to gather some info into the syslog using -s 255 and I cannot find any hints why the process is crashing. I am running OpenLDAP 2.4.24 and here are the entries generated in the syslog after the ldapmodify command:
Feb 7 16:00:27 charpak ldapmodify: mdns: Couldn't open nss_mdns configuration file /etc/nss_mdns.conf, using default. Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on 1 descriptor Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on: Feb 7 16:00:31 charpak slapd[23821]: Feb 7 16:00:31 charpak slapd[23821]: slap_listener_activate(9): Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=7 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=8 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=9 busy Feb 7 16:00:31 charpak slapd[23821]: >>> slap_listener(ldapi://%2fvar% 2frun%2fopenldap%2fslapd.sock) Feb 7 16:00:31 charpak slapd[23821]: daemon: listen=9, new connection on 15 Feb 7 16:00:31 charpak slapd[23821]: daemon: added 15r (active) listener=(nil) Feb 7 16:00:31 charpak slapd[23821]: conn=1000 fd=15 ACCEPT from PATH=/var/run/openldap/slapd.sock (PATH=/var/run/openldap/slapd.sock) Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on 1 descriptor Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on: Feb 7 16:00:31 charpak slapd[23821]: Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=7 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=8 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=9 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on 1 descriptor Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on: Feb 7 16:00:31 charpak slapd[23821]: 15r Feb 7 16:00:31 charpak slapd[23821]: Feb 7 16:00:31 charpak slapd[23821]: daemon: read active on 15 Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=7 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=8 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=9 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: connection_get(15) Feb 7 16:00:31 charpak slapd[23821]: connection_get(15): got connid=1000 Feb 7 16:00:31 charpak slapd[23821]: connection_read(15): checking for input on id=1000 Feb 7 16:00:31 charpak slapd[23821]: op tag 0x60, time 1328648431 Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=0 do_bind Feb 7 16:00:31 charpak slapd[23821]: >>> dnPrettyNormal: <cn=config> Feb 7 16:00:31 charpak slapd[23821]: <<< dnPrettyNormal: <cn=config>, <cn=config> Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=0 BIND dn="cn=config" method=128 Feb 7 16:00:31 charpak slapd[23821]: do_bind: version=3 dn="cn=config" method=128 Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=0 BIND dn="cn=config" mech=SIMPLE ssf=0 Feb 7 16:00:31 charpak slapd[23821]: do_bind: v3 bind: "cn=config" to "cn=config" Feb 7 16:00:31 charpak slapd[23821]: send_ldap_result: conn=1000 op=0 p=3 Feb 7 16:00:31 charpak slapd[23821]: send_ldap_result: err=0 matched="" text="" Feb 7 16:00:31 charpak slapd[23821]: send_ldap_response: msgid=1 tag=97 err=0 Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=0 RESULT tag=97 err=0 text= Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on 1 descriptor Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on: Feb 7 16:00:31 charpak slapd[23821]: Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=7 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=8 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=9 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on 1 descriptor Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on: Feb 7 16:00:31 charpak slapd[23821]: 15r Feb 7 16:00:31 charpak slapd[23821]: Feb 7 16:00:31 charpak slapd[23821]: daemon: read active on 15 Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=7 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=8 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=9 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: connection_get(15) Feb 7 16:00:31 charpak slapd[23821]: connection_get(15): got connid=1000 Feb 7 16:00:31 charpak slapd[23821]: connection_read(15): checking for input on id=1000 Feb 7 16:00:31 charpak slapd[23821]: op tag 0x66, time 1328648431 Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=1 do_modify Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=1 do_modify: dn (cn=config) Feb 7 16:00:31 charpak slapd[23821]: >>> dnPrettyNormal: <cn=config> Feb 7 16:00:31 charpak slapd[23821]: <<< dnPrettyNormal: <cn=config>, <cn=config> Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=1 modifications: Feb 7 16:00:31 charpak slapd[23821]: add: olcTLSCACertificatePath Feb 7 16:00:31 charpak slapd[23821]: one value, length 14 Feb 7 16:00:31 charpak slapd[23821]: add: olcTLSCertificateFile Feb 7 16:00:31 charpak slapd[23821]: one value, length 28 Feb 7 16:00:31 charpak slapd[23821]: add: olcTLSCertificateKeyFile Feb 7 16:00:31 charpak slapd[23821]: one value, length 27 Feb 7 16:00:31 charpak slapd[23821]: add: olcTLSCipherSuite Feb 7 16:00:31 charpak slapd[23821]: one value, length 6 Feb 7 16:00:31 charpak slapd[23821]: replace: olcTLSVerifyClient Feb 7 16:00:31 charpak slapd[23821]: one value, length 5 Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=1 MOD dn="cn=config" Feb 7 16:00:31 charpak slapd[23821]: conn=1000 op=1 MOD attr=olcTLSCACertificatePath olcTLSCertificateFile olcTLSCertificateKeyFile olcTLSCipherSuite olcTLSVerifyClient Feb 7 16:00:31 charpak slapd[23821]: <= acl_access_allowed: granted to database root Feb 7 16:00:31 charpak slapd[23821]: oc_check_required entry (cn=config), objectClass "olcGlobal" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "objectClass" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "cn" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcConfigFile" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcConfigDir" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcArgsFile" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcAttributeOptions" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcAuthzPolicy" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcAuthzRegexp" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcConcurrency" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcConnMaxPending" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcConnMaxPendingAuth" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcGentleHUP" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcIdleTimeout" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcIndexSubstrIfMaxLen" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcIndexSubstrIfMinLen" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcIndexSubstrAnyLen" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcIndexSubstrAnyStep" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcIndexIntLen" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcLocalSSF" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcPidFile" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcReadOnly" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcReverseLookup" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcSaslHost" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcSaslSecProps" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcServerID" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcSockbufMaxIncoming" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcSockbufMaxIncomingAuth" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcThreads" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcToolThreads" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcWriteTimeout" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "structuralObjectClass" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "entryUUID" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "creatorsName" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "createTimestamp" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcTLSCACertificatePath" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcTLSCertificateFile" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcTLSCertificateKeyFile" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcTLSCipherSuite" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "olcTLSVerifyClient" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "entryCSN" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "modifiersName" Feb 7 16:00:31 charpak slapd[23821]: oc_check_allowed type "modifyTimestamp" Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on 1 descriptor Feb 7 16:00:31 charpak slapd[23821]: daemon: activity on: Feb 7 16:00:31 charpak slapd[23821]: Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=7 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=8 active_threads=0 tvp=zero Feb 7 16:00:31 charpak slapd[23821]: daemon: epoll: listen=9 active_threads=0 tvp=zero
Any hints?
Le mardi 07 février 2012 à 16:09 -0500, Daniel Savard a écrit : (...)
add: olcTLSCipherSuite olcTLSCipherSuite: AES256
(...)
Seems the cipher list is the offending value which cause the crash. I did start the slapd process with the debug flag and got the following message (I did try with HIGH instead of AES256 with same result below):
... oc_check_allowed type "modifyTimestamp" TLS: could not set cipher list HIGH. *** glibc detected *** /usr/lib/openldap/slapd: double free or corruption (!prev): 0x08269cd8 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6e7b1)[0xb74217b1] /lib/libc.so.6(+0x700e3)[0xb74230e3] /lib/libc.so.6(cfree+0x6d)[0xb742626d] /usr/lib/libgnutls.so.26(gnutls_priority_deinit+0x20)[0xb731f500] /usr/lib/libldap_r-2.4.so.2(+0x3a9d3)[0xb77c09d3] /usr/lib/libldap_r-2.4.so.2(ldap_pvt_tls_ctx_free+0x25)[0xb77bd5c5] /usr/lib/libldap_r-2.4.so.2(+0x37697)[0xb77bd697] /usr/lib/openldap/slapd[0x8061642] /usr/lib/openldap/slapd[0x806669f] /usr/lib/openldap/slapd(fe_op_modify+0x1b5)[0x8094215] /usr/lib/openldap/slapd(do_modify+0x7c7)[0x80962e7] /usr/lib/openldap/slapd[0x807c2df] /usr/lib/openldap/slapd[0x807cc4a] /usr/lib/libldap_r-2.4.so.2(+0xeb6c)[0xb7794b6c] /lib/libpthread.so.0(+0x6e32)[0xb75f9e32] /lib/libc.so.6(clone+0x5e)[0xb748530e] ======= Memory map: ======= ...
Accordingly to the documentation, HIGH is an acceptable value.
How should I proceed to implement TLS? The documentation is still referring to the old slapd.conf file.
--On Tuesday, February 07, 2012 5:05 PM -0500 Daniel Savard dsavard@cids.ca wrote:
Le mardi 07 février 2012 à 16:09 -0500, Daniel Savard a écrit : (...)
add: olcTLSCipherSuite olcTLSCipherSuite: AES256
(...)
Seems the cipher list is the offending value which cause the crash. I did start the slapd process with the debug flag and got the following message (I did try with HIGH instead of AES256 with same result below):
... oc_check_allowed type "modifyTimestamp" TLS: could not set cipher list HIGH. *** glibc detected *** /usr/lib/openldap/slapd: double free or corruption (!prev): 0x08269cd8 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6e7b1)[0xb74217b1] /lib/libc.so.6(+0x700e3)[0xb74230e3] /lib/libc.so.6(cfree+0x6d)[0xb742626d] /usr/lib/libgnutls.so.26(gnutls_priority_deinit+0x20)[0xb731f500] /usr/lib/libldap_r-2.4.so.2(+0x3a9d3)[0xb77c09d3] /usr/lib/libldap_r-2.4.so.2(ldap_pvt_tls_ctx_free+0x25)[0xb77bd5c5] /usr/lib/libldap_r-2.4.so.2(+0x37697)[0xb77bd697] /usr/lib/openldap/slapd[0x8061642] /usr/lib/openldap/slapd[0x806669f] /usr/lib/openldap/slapd(fe_op_modify+0x1b5)[0x8094215] /usr/lib/openldap/slapd(do_modify+0x7c7)[0x80962e7] /usr/lib/openldap/slapd[0x807c2df] /usr/lib/openldap/slapd[0x807cc4a] /usr/lib/libldap_r-2.4.so.2(+0xeb6c)[0xb7794b6c] /lib/libpthread.so.0(+0x6e32)[0xb75f9e32] /lib/libc.so.6(clone+0x5e)[0xb748530e] ======= Memory map: ======= ...
Accordingly to the documentation, HIGH is an acceptable value.
How should I proceed to implement TLS? The documentation is still referring to the old slapd.conf file.
I would first upgrade to a more recent release. I would also generally advise using something more secure than GnuTLS, such as OpenSSL, to link OpenLDAP to.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
Le mardi 07 février 2012 à 15:23 -0800, Quanah Gibson-Mount a écrit :
--On Tuesday, February 07, 2012 5:05 PM -0500 Daniel Savard dsavard@cids.ca wrote:
(...)
I would first upgrade to a more recent release. I would also generally advise using something more secure than GnuTLS, such as OpenSSL, to link OpenLDAP to.
--Quanah
I am running OpenLDAP 2.4.24 and 2.4.23 is marked as the latest stable release from the OpenLDAP site. Very latest release is 2.4.28.
I am actually using OpenSSL to generate certificates.
Am Tue, 07 Feb 2012 20:25:19 -0500 schrieb Daniel Savard dsavard@cids.ca:
Le mardi 07 février 2012 à 15:23 -0800, Quanah Gibson-Mount a écrit :
--On Tuesday, February 07, 2012 5:05 PM -0500 Daniel Savard dsavard@cids.ca wrote:
(...)
I would first upgrade to a more recent release. I would also generally advise using something more secure than GnuTLS, such as OpenSSL, to link OpenLDAP to.
--Quanah
I am running OpenLDAP 2.4.24 and 2.4.23 is marked as the latest stable release from the OpenLDAP site. Very latest release is 2.4.28.
I am actually using OpenSSL to generate certificates.
But openldap is compiled with libgnutls, thus read on gnuTLS cipher suits http://www.gnu.org/software/gnutls/manual/html_node/Supported-ciphersuites.h...
-Dieter
--On Tuesday, February 07, 2012 8:25 PM -0500 Daniel Savard dsavard@cids.ca wrote:
Le mardi 07 février 2012 à 15:23 -0800, Quanah Gibson-Mount a écrit :
--On Tuesday, February 07, 2012 5:05 PM -0500 Daniel Savard dsavard@cids.ca wrote:
(...)
I would first upgrade to a more recent release. I would also generally advise using something more secure than GnuTLS, such as OpenSSL, to link OpenLDAP to.
--Quanah
I am running OpenLDAP 2.4.24 and 2.4.23 is marked as the latest stable release from the OpenLDAP site. Very latest release is 2.4.28.
I am actually using OpenSSL to generate certificates.
As noted numerous times on this list, "stable" is generally a meaningless term. Use 2.4.28 or if you delay long enough, 2.4.29 when it comes out. And as someone else already noted, the point is your OpenLDAP is linked to GnuTLS, which I strongly advise avoiding.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
Le mercredi 08 février 2012 à 12:09 -0800, Quanah Gibson-Mount a écrit :
As noted numerous times on this list, "stable" is generally a meaningless term. Use 2.4.28 or if you delay long enough, 2.4.29 when it comes out. And as someone else already noted, the point is your OpenLDAP is linked to GnuTLS, which I strongly advise avoiding.
--Quanah
I've just got it about GnuTLS, currently compiling OpenLDAP without it.
THX,
Daniel
Le mercredi 08 février 2012 à 15:49 -0500, Daniel Savard a écrit :
Le mercredi 08 février 2012 à 12:09 -0800, Quanah Gibson-Mount a écrit :
As noted numerous times on this list, "stable" is generally a meaningless term. Use 2.4.28 or if you delay long enough, 2.4.29 when it comes out. And as someone else already noted, the point is your OpenLDAP is linked to GnuTLS, which I strongly advise avoiding.
--Quanah
I've just got it about GnuTLS, currently compiling OpenLDAP without it.
THX,
Daniel
Thanks all! It's working now after recompiling without GnuTLS support.
Daniel Savard
Hi,
On Wednesday, 8. February 2012, Quanah Gibson-Mount wrote:
I would also generally advise using something more secure than GnuTLS, such as OpenSSL, to link OpenLDAP to.
Quanah, as you refer to GnuTLS being buggy, can you give a reference?
Thanks Peter
Peter Marschall wrote:
Hi,
On Wednesday, 8. February 2012, Quanah Gibson-Mount wrote:
I would also generally advise using something more secure than GnuTLS, such as OpenSSL, to link OpenLDAP to.
Quanah, as you refer to GnuTLS being buggy, can you give a reference?
This is the most recent example I can recall, there are plenty of others.
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/423252
Stuff like this has bearing on the other recent email thread here
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514807
That bug has over 200 comments on it; this one is directly relevant to our topic:
http://groups.google.com/group/linux.debian.bugs.dist/msg/8fec96a62571d6e9?p...
We hit that here
http://www.openldap.org/its/index.cgi/Software%20Bugs?id=5991
and also ITS#5992
GnuTLS is not simply *buggy* - it is poorly designed, and the design choices they've made continue to (and will continue to) cause usability issues indefinitely.
openldap-technical@openldap.org