Bug 733077

Summary: OpenLDAP 2.4.23 segfaults when using back-sql
Product: [Fedora] Fedora Reporter: Jan Vcelak <jvcelak>
Component: openldapAssignee: Jan Vcelak <jvcelak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 15CC: jvcelak, rene.snajder, rmeggins, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openldap-2.4.24-5.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 727533 Environment:
Last Closed: 2011-11-17 23:42:36 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: 727533    
Bug Blocks:    

Description Jan Vcelak 2011-08-24 16:04:04 UTC
Only F15 affected, F16+ is fixed.

+++ This bug was initially created as a clone of Bug #727533 +++

Created attachment 516308 [details]
The patch that fixes this issue.

Description of problem:
The bug makes openldap with back-sql unusable at least since version 2.4.22. 
Whenever a user tries to authenticate the server segfaults. The issue is described here:
http://www.openldap.org/its/index.cgi/Software%20Bugs?id=6657;selectid=6657

and a fix has been provided in OpenLDAP 2.4.26. Please either release 2.4.26 in the yum repositories OR include the attached patch which fixes this issue.

Version-Release number of selected component (if applicable): 2.4.23-15


How reproducible:
Set up OpenLDAP 2.4.23 with back-sql and then run ldapwhoami with one of the users from the database (not the Manager user from the slapd.conf).

Actual results:
The slapd daemon segfaults.

Expected results:
The DN of the authenticated user, and (of course) slapd not segfaulting.

Additional info:
I provided a patch in the attachment which works if applied to 2.4.23 (the current version in the repository). The patch is an adapted version of Howard Chu's commit in the OpenLDAP GIT repository:
http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commitdiff;h=0a9f51f58d1e20f92ad2f6a21c70ca04304a7f93

It was meant to be applied on 2.4.25. I adapted it to work with 2.4.23.

An update to 2.4.26 would of course also be a solution.

--- Additional comment from jvcelak on 2011-08-09 19:12:22 CEST ---

It can be reproduced, the fix works and is included upstream. Thank you for your report.

--- Additional comment from jvcelak on 2011-08-09 19:16:55 CEST ---

Created attachment 517450 [details]
configuration files for quick setup

Ondrej (QA), I'm attaching some configuration files I used when setting up OpenLDAP back_sql + PostgreSQL.

I always managed to reproduce the segfault with:
# ldapsearch -x -b "o=sql,c=RU" +

--- Additional comment from jvcelak on 2011-08-15 10:24:50 CEST ---

Resolved in openldap-2.4.23-17.el6

Comment 1 Fedora Update System 2011-08-24 19:39:31 UTC
openldap-2.4.24-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/openldap-2.4.24-4.fc15

Comment 2 Fedora Update System 2011-08-26 19:04:28 UTC
Package openldap-2.4.24-4.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openldap-2.4.24-4.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/openldap-2.4.24-4.fc15
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-09-12 19:02:37 UTC
openldap-2.4.24-5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/openldap-2.4.24-5.fc15

Comment 4 Fedora Update System 2011-11-17 23:42:36 UTC
openldap-2.4.24-5.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.