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 <<
attributeTypes: (188.8.131.52.4.1.34184.108.40.206.2.6 NAME
'nzCoSkyReceiveMarketingNewsLetter' DESC 'Whether the user opts to receive SKY
TV news letters' EQUALITY booleanMatch ORDERING booleanMatch SYNTAX
(220.127.116.11.4.1.3418.104.22.168.2.6 NAME 'nzCoSkyReceiveMarketingNewsLetter' DESC
'Whether the user opts to receive SKY TV news letters' EQUALITY booleanMatch
ORDERING booleanMatch SYNTAX 22.214.171.124.4.1.14126.96.36.199.7 SINGLE-VALUE)
modifying entry "cn=schema"
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.1137188.8.131.52.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
> changetype: add
> objectClass: top
> objectClass: nsIndex
> nsMatchingRule: 2.16.840.1.1137184.108.40.206.6.1
> nsMatchingRule: 2.16.840.1.1137220.127.116.11.11.1
ldapmodify: invalid format (line 2) entry:
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).
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.
Created attachment 505957 [details]
Attaching proposed patch.
I have also created an upstream report and submitted the patch:
Created attachment 509682 [details]
Upstream included a different fix,
Fix included in openldap-2.4.23-16.el6
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.
- 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
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.