RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 701227 - Segmentation fault (core dumped) in ldapmodify
Summary: Segmentation fault (core dumped) in ldapmodify
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openldap
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 6.1
Assignee: Jan Vcelak
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 716855
TreeView+ depends on / blocked
 
Reported: 2011-05-02 07:54 UTC by Amita Sharma
Modified: 2013-03-04 01:29 UTC (History)
7 users (show)

Fixed In Version: openldap-2.4.23-16.el6
Doc Type: Bug Fix
Doc Text:
- pass LDIF input file to any openldap client tool (e.g. ldapadd) while some line is splitted (by '\n') but missing correct indentation (the next line has to be indented by one space character) - client tool crashes with segmentation fault - the unusual situation is now handled by the tools - requested operation succeeds/fails, but the tool does not crash
Clone Of:
: 716855 (view as bug list)
Environment:
Last Closed: 2011-12-06 12:12:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch (894 bytes, patch)
2011-06-22 09:56 UTC, Jan Vcelak
rmeggins: review+
Details | Diff
upstream patch (596 bytes, patch)
2011-06-24 07:05 UTC, Jan Vcelak
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1514 0 normal SHIPPED_LIVE openldap bug fix and enhancement update 2011-12-06 00:51:20 UTC

Description Amita Sharma 2011-05-02 07:54:05 UTC
Steps to reproduce:


1) find or create an attribute which has an ORDERING matching rule
(and not via inheritance - that's another bug)

ldapmodify -x -h localhost -p 1389 -D "cn=directory manager" -w ggg -v <<
EOF
dn: cn=schema
changetype: modify
add: attributetypes
attributeTypes: (1.3.6.1.4.1.34217.1.1.1.2.6 NAME
'nzCoSkyReceiveMarketingNewsLetter' DESC 'Whether the user opts to receive SKY
TV news letters' EQUALITY booleanMatch ORDERING booleanMatch SYNTAX
1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE)

add attributeTypes:
(1.3.6.1.4.1.34217.1.1.1.2.6 NAME 'nzCoSkyReceiveMarketingNewsLetter' DESC
'Whether the user opts to receive SKY TV news letters' EQUALITY booleanMatch
ORDERING booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE)
modifying entry "cn=schema"
modify complete

2) add or change the index for the attribute to have an nsMatchingRule
with one of the l10n matching rules defined by the collation plugin
e.g. 2.16.840.1.113730.3.3.2.11.1 for en or en-US
[root@rheltest slapd-rheltest]# ldapmodify -a -D "cn=directory manager" -w
ggg -p 1389 -h localhost << EOF
>  dn: cn=nzCoSkyReceiveMarketingNewsletter,cn=index,cn=userRoot,cn=ldbm
>  database,cn=plugins,cn=config
>  changetype: add
>  objectClass: top
>  objectClass: nsIndex
>  cn:nzCoSkyReceiveMarketingNewsletter
>  nsSystemIndex:false
>  nsIndexType:eq
>  nsMatchingRule: 2.16.840.1.113730.3.3.2.6.1
>  nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1
>  EOF
ldapmodify: invalid format (line 2) entry:
"cn=nzCoSkyReceiveMarketingNewsletter,cn=index,cn=userRoot,cn=ldbm"
Segmentation fault (core dumped) 

Note: The dn: .. line must be all one line.  It looks like the line ends at cn=ldbm and a new line begins at database,. 
But still it should not be a Segmentation fault (core dumped).

Comment 1 Rich Megginson 2011-05-02 14:43:43 UTC
looks like the problem is if the dn: line continues but does not begin with a space char (as in proper LDIF continuation line wrapping) ldapmodify will crash.

Comment 5 Jan Vcelak 2011-06-22 09:56:55 UTC
Created attachment 505957 [details]
proposed patch

Attaching proposed patch.

I have also created an upstream report and submitted the patch:
http://www.openldap.org/its/index.cgi?findid=6978

Comment 6 Jan Vcelak 2011-06-24 07:05:50 UTC
Created attachment 509682 [details]
upstream patch

Upstream included a different fix,

Comment 7 Jan Vcelak 2011-07-18 15:55:10 UTC
Fix included in openldap-2.4.23-16.el6

Comment 9 Jan Vcelak 2011-08-15 09:10:38 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
- pass LDIF input file to any openldap client tool (e.g. ldapadd) while some line is splitted (by '\n') but missing correct indentation (the next line has to be indented by one space character)
- client tool crashes with segmentation fault
- the unusual situation is now handled by the tools
- requested operation succeeds/fails, but the tool does not crash

Comment 11 errata-xmlrpc 2011-12-06 12:12:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1514.html


Note You need to log in before you can comment on or make changes to this bug.