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 1193243 - ldbm_usn_init: Valgrind reports Invalid read / SIGSEGV
Summary: ldbm_usn_init: Valgrind reports Invalid read / SIGSEGV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
: 1166460 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-16 23:45 UTC by Noriko Hosoi
Modified: 2020-09-13 20:54 UTC (History)
4 users (show)

Fixed In Version: 389-ds-base-1.2.11.15-51.el6
Doc Type: Bug Fix
Doc Text:
When there was a suffix with no backend database associated, the server did not start due to the segmentation fault in ldbm_usn_init. The bug was fixed and the server starts.
Clone Of:
Environment:
Last Closed: 2015-07-22 06:37:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
valgrind output (59.29 KB, text/plain)
2015-03-15 21:22 UTC, Viktor Ashirov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 996 0 None None None 2020-09-13 20:54:07 UTC
Red Hat Product Errata RHBA-2015:1326 0 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2015-07-20 17:53:07 UTC

Description Noriko Hosoi 2015-02-16 23:45:52 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47659

==26183==
==26183== Invalid read of size 8
==26183==    at 0xFF0E29C: ldbm_usn_init (ldbm_usn.c:83)
==26183==    by 0xFF20786: ldbm_back_start (start.c:300)
==26183==    by 0x4CC34E3: plugin_call_func (plugin.c:1474)
==26183==    by 0x4CC33D0: plugin_call_one (plugin.c:1442)
==26183==    by 0x4CC2BE1: plugin_dependency_startall (plugin.c:1214)
==26183==    by 0x4CC3302: plugin_startall (plugin.c:1404)
==26183==    by 0x12F3CA: main (main.c:1187)
==26183==  Address 0x80 is not stack'd, malloc'd or (recently) free'd
==26183==
==26183==
==26183== Process terminating with default action of signal 11 (SIGSEGV)
==26183==  Access not within mapped region at address 0x80
==26183==    at 0xFF0E29C: ldbm_usn_init (ldbm_usn.c:83)
==26183==    by 0xFF20786: ldbm_back_start (start.c:300)
==26183==    by 0x4CC34E3: plugin_call_func (plugin.c:1474)
==26183==    by 0x4CC33D0: plugin_call_one (plugin.c:1442)
==26183==    by 0x4CC2BE1: plugin_dependency_startall (plugin.c:1214)
==26183==    by 0x4CC3302: plugin_startall (plugin.c:1404)
==26183==    by 0x12F3CA: main (main.c:1187)
==26183==  If you believe this happened as a result of a stack
==26183==  overflow in your program's main thread (unlikely but
==26183==  possible), you can try to increase the size of the
==26183==  main thread stack using the --main-stacksize= flag.
==26183==  The main thread stack size used in this run was 8388608.
==26183==

 62 void
 63 ldbm_usn_init(struct ldbminfo  *li)
    ...
 79     /* Search each namingContext in turn */
 80     for ( sdn = slapi_get_first_suffix( &node, 0 ); sdn != NULL;
 81           sdn = slapi_get_next_suffix_ext( &node, 0 )) {
 82         be = slapi_mapping_tree_find_backend_for_sdn(sdn);
 83         slapi_log_error(SLAPI_LOG_BACKLDBM, "ldbm_usn_init",
 84                     "backend: %s%s\n", be->be_name, isglobal?" (global mode)":""); <== crashed here; slapi_mapping_tree_find_backend_for_sdn returned 0x80?

Comment 1 Jenny Severance 2015-02-17 10:56:48 UTC
please add steps to reproduce and verify this issue

Comment 2 Noriko Hosoi 2015-02-17 22:01:54 UTC
Steps to verify:
1. create a suffix mapping tree without backend.  E.g.,
ldapmodify -a ... << EOF
dn: cn=dc\3Dnew\2Cdc\3Dcom,cn=mapping tree,cn=config
objectClass: top
objectClass: extensibleObject
objectClass: nsMappingTree
nsslapd-state: Disabled
cn: dc=new,dc=com
EOF

2. enable the LDAP_DEBUG_BACKLDBM log level:
nsslapd-errorlog-level: 524288

3. Start ns-slapd via valgrind

4. If no invalid read error indicating ldbm_usn_init, the bug was verified.
==26183== Invalid read of size 8
==26183==    at 0xFF0E29C: ldbm_usn_init (ldbm_usn.c:83)
...

Comment 3 Noriko Hosoi 2015-02-19 01:50:34 UTC
*** Bug 1166460 has been marked as a duplicate of this bug. ***

Comment 5 Viktor Ashirov 2015-03-15 21:22:56 UTC
Created attachment 1002048 [details]
valgrind output

Build tested:
389-ds-base-1.2.11.15-52.el6.x86_64
389-ds-base-libs-1.2.11.15-52.el6.x86_64

No mentions of ldbm_usn_init in the valgrind output.

Marking as VERIFIED.

Comment 6 errata-xmlrpc 2015-07-22 06:37:00 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.

https://rhn.redhat.com/errata/RHBA-2015-1326.html


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