Bug 755725
Summary: | 389 programs linked against openldap crash during shutdown | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jr Aquino <jr.aquino> | ||||
Component: | 389-ds-base | Assignee: | Rich Megginson <rmeggins> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 15 | CC: | edewata, nhosoi, nkinder, rmeggins | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 389-dsgw-1.1.9-1.fc16 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-02-02 17:27:20 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 743970, 769107 | ||||||
Attachments: |
|
Description
Jr Aquino
2011-11-21 21:18:43 UTC
Adjustment to Reproduce issue. Standard install does NOT appear to generate the segfault. (Corrected Method) Steps to Reproduce: 1. Install FreeIPA 2. Install FreeIPA Replica Server 3. Restart FreeIPA Master 4. check dmesg for the segfault The crash is occurring here: static void ldap_int_destroy_global_options(void) ... #ifdef HAVE_CYRUS_SASL if ( gopts->ldo_def_sasl_authcid ) { LDAP_FREE( gopts->ldo_def_sasl_authcid ); gopts->ldo_def_sasl_authcid = NULL; } #endif Either gopts->ldo_def_sasl_authcid is corrupted, or someone else freed it and didn't set it to NULL. I suspect that in order to trigger this bug you'd have to attempt a SASL/GSSAPI bind in replication or DNA. now happening in dsgw CGI programs as well: Core was generated by `/usr/lib64/dirsrv/dsgw-cgi-bin/doauth'. Program terminated with signal 11, Segmentation fault. #0 0x0000003eaca80c14 in ?? () Missing separate debuginfos, use: debuginfo-install glibc-2.14.90-19.x86_64 (gdb) up #1 0x0000003ebda0eb90 in ldap_int_destroy_global_options () at ../../../libraries/libldap/init.c:496 496 LDAP_FREE( gopts->ldo_def_sasl_authcid ); (gdb) p *gopts $1 = {ldo_valid = 0, ldo_debug = 32768, ldo_peer = 0x0, ldo_cldapdn = 0x0, ldo_is_udp = 0, ldo_tm_api = {tv_sec = 0, tv_usec = 0}, ldo_tm_net = {tv_sec = 0, tv_usec = 0}, ldo_version = 0, ldo_deref = 0, ldo_timelimit = 0, ldo_sizelimit = 0, ldo_tls_ctx = 0x0, ldo_tls_connect_cb = 0, ldo_tls_connect_arg = 0x0, ldo_tls_info = {lt_certfile = 0x0, lt_keyfile = 0x0, lt_dhfile = 0x0, lt_cacertfile = 0x0, lt_cacertdir = 0x0, lt_ciphersuite = 0x0, lt_crlfile = 0x0, lt_randfile = 0x0, lt_protocol_min = 0}, ldo_tls_mode = 0, ldo_tls_require_cert = 0, ldo_tls_impl = 0, ldo_defludp = 0x0, ldo_defport = 0, ldo_defbase = 0x0, ldo_defbinddn = 0x0, ldo_def_sasl_mech = 0x0, ldo_def_sasl_realm = 0x0, ldo_def_sasl_authcid = 0x0, ldo_def_sasl_authzid = 0x0, ldo_sasl_secprops = {min_ssf = 0, max_ssf = 0, maxbufsize = 0, security_flags = 0, property_names = 0x0, property_values = 0x0}, ldo_keepalive_idle = 0, ldo_keepalive_probes = 0, ldo_keepalive_interval = 0, ldo_refhoplimit = 0, ldo_sctrls = 0x0, ldo_cctrls = 0x0, ldo_rebind_proc = 0, ldo_rebind_params = 0x0, ldo_nextref_proc = 0, ldo_nextref_params = 0x0, ldo_urllist_proc = 0, ldo_urllist_params = 0x0, ldo_conn_cbs = 0x0, ldo_booleans = 0} (gdb) I've been able to reproduce this using doauth from dsgw on F-16. It looks as though the function ldap_int_destroy_global_options() is called twice during shutdown. The first time it works fine. The second time it fails. In the debugger, I can see the value of ldo_def_sasl_authcid == 0x0, but if ( gopts->ldo_def_sasl_authcid ) { LDAP_FREE( gopts->ldo_def_sasl_authcid ); gopts->ldo_def_sasl_authcid = NULL; } this goes into LDAP_FREE anyway????? And inside LDAP_FREE, the value is 0x185 (which strangely is 389 in decimal). valgrind reports no errors except for the attempt to free 0x185 (which of course is not malloced). Created attachment 547304 [details]
0001-Bug-755725-389-programs-linked-against-openldap-cras.patch
commit 91fa21f6af7871d73bb9d5e738ec4e31b5298463 Author: Rich Megginson <rmeggins> Date: Wed Dec 14 20:04:48 2011 -0700 Reviewed by: nhosoi (Thanks!) Branch: master Fix Description: With recent versions of openldap, you cannot link with both ldap_r and ldap - when the shared object _fini is run, the _fini from the on will stomp on the _fini from the other, and the program will crash. The fix is to link with ldap_r only in a threaded program, and ldap otherwise. Platforms tested: Fedora 16, RHEL6 x86_64 Flag Day: no 389-dsgw-1.1.8-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/389-dsgw-1.1.8-1.fc15 389-dsgw-1.1.8-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/389-dsgw-1.1.8-1.fc16 389-ds-base-1.2.10-0.6.a6.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10-0.6.a6.fc15 389-ds-base-1.2.10-0.6.a6.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10-0.6.a6.el5 389-ds-base-1.2.10-0.6.a6.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10-0.6.a6.fc16 slapi-nis-0.28-1.fc16,freeipa-2.1.4-3.fc16,389-ds-base-1.2.10-0.6.a6.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/slapi-nis-0.28-1.fc16,freeipa-2.1.4-3.fc16,389-ds-base-1.2.10-0.6.a6.fc16 389-ds-base-1.2.10-0.6.a6.fc15,slapi-nis-0.28-1.fc15,freeipa-2.1.4-2.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10-0.6.a6.fc15,slapi-nis-0.28-1.fc15,freeipa-2.1.4-2.fc15 Package slapi-nis-0.28-1.fc16, freeipa-2.1.4-3.fc16, 389-ds-base-1.2.10-0.6.a6.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing slapi-nis-0.28-1.fc16 freeipa-2.1.4-3.fc16 389-ds-base-1.2.10-0.6.a6.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-17313/slapi-nis-0.28-1.fc16,freeipa-2.1.4-3.fc16,389-ds-base-1.2.10-0.6.a6.fc16 then log in and leave karma (feedback). Upstream ticket: https://fedorahosted.org/389/ticket/252 389-ds-base-1.2.10-0.8.a7.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10-0.8.a7.el5 389-ds-base-1.2.10-0.9.a8.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10-0.9.a8.el5 389-ds-base-1.2.10-0.6.a6.fc15, slapi-nis-0.28-1.fc15, freeipa-2.1.4-3.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. slapi-nis-0.28-1.fc16, 389-ds-base-1.2.10-0.6.a6.fc16, freeipa-2.1.4-4.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. 389-dsgw-1.1.9-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/389-dsgw-1.1.9-1.fc16 389-dsgw-1.1.9-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/389-dsgw-1.1.9-1.fc15 389-ds-base-1.2.10-0.10.rc1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10-0.10.rc1.el5 389-ds-base-1.2.10.0-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10.0-1.el5 389-ds-base-1.2.10.2-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10.2-1.el5 389-ds-base-1.2.10.3-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10.3-1.el5 389-ds-base-1.2.10.4-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10.4-2.el5 389-ds-base-1.2.10.4-3.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/389-ds-base-1.2.10.4-3.el5 389-dsgw-1.1.9-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. 389-dsgw-1.1.9-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |