Bug 239754 - Samba4 test can crash FDS
Summary: Samba4 test can crash FDS
Alias: None
Product: 389
Classification: Retired
Component: Install/Uninstall   
(Show other bugs)
Version: 1.1.0beta
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Chandrasekar Kannan
Depends On:
Blocks: 240316
TreeView+ depends on / blocked
Reported: 2007-05-11 00:36 UTC by Andrew Bartlett
Modified: 2015-01-04 23:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-16 13:22:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Samba4 patch which breaks FDS in selftest (648 bytes, patch)
2007-05-11 00:36 UTC, Andrew Bartlett
no flags Details | Diff

Description Andrew Bartlett 2007-05-11 00:36:30 UTC
Description of problem:
Invalid LDIF (such as in the patch for samba4 below)

Version-Release number of selected component (if applicable):
current cvs

How reproducible:
Every time

Steps to Reproduce:
1. Download and build Samba4
2. apply this patch
3. FEDORA_DS_PREFIX=/opt/fedora-ds TEST_LDAP=yes make test
Actual results:
FDS will fail to start, having segfaulted on the invalid input

Expected results:
FDS will fail to start, objecting to the invalid input

Additional info:
The failure is in the loading of the databases for the sub-suffixes.

If configured in the kernel, a core file will be left, which reveals this backtrace:

#0  ldbm_instance_find_by_name (li=0x996e5f0, name=0x0)
    at ./ldap/servers/slapd/intrinsics.h:97
97                      if ( ((l = (unsigned char)(*(src++))) >= 'A') && (l <=
'Z') )
(gdb) bt full
#0  ldbm_instance_find_by_name (li=0x996e5f0, name=0x0)
    at ./ldap/servers/slapd/intrinsics.h:97
        inst_obj = (Object *) 0x99843d8
        inst = (ldbm_instance *) 0x99bbbd8
#1  0x4056c719 in ldbm_instance_add_instance_entry_callback (pb=0x0, 
    entryBefore=0x99c7558, entryAfter=0x0, returncode=0x0, returntext=0x0, 
    arg=0x996e5f0) at ldap/servers/slapd/back-ldbm/ldbm_instance_config.c:824
        instance_name = 0x0
        inst = <value optimized out>
        li = <value optimized out>
        rc = <value optimized out>
#2  0x40565cef in ldbm_config_read_instance_entries (li=0x996e5f0, 
    backend_type=0x996fc98 "ldbm database")
    at ldap/servers/slapd/back-ldbm/ldbm_config.c:1260
        tmp_pb = (Slapi_PBlock *) 0x99ba9f0
        basedn = "cn=ldbm database, cn=plugins, cn=config\000Q�R", '\0' <repeats
33 times>, "0\000\000\000\000\000\000\000��^\000Q�R", '\0' <repeats 29 times>,
�\233\t \207"...
        entries = (Slapi_Entry **) 0x99bc500
---Type <return> to continue, or q <return> to quit---
#3  0x40566cf5 in ldbm_config_load_dse_info (li=0x996e5f0)
    at ldap/servers/slapd/back-ldbm/ldbm_config.c:1320
        search_pb = <value optimized out>
        entries = (Slapi_Entry **) 0x991e880
        res = 0
        dn = "cn=config, cn=ldbm database, cn=plugins,
\000\000\0000qa\000\026\000S\000 qa\000!\000\000\000 �\233\t�\231\233\t�_a\000
#4  0x4057c7f8 in ldbm_back_start (pb=0x99c2be0)
    at ldap/servers/slapd/back-ldbm/start.c:66
        li = (struct ldbminfo *) 0x996e5f0
        home_dir = <value optimized out>
        action = <value optimized out>
        retval = <value optimized out>
        initialized = 0

Comment 1 Andrew Bartlett 2007-05-11 00:36:30 UTC
Created attachment 154508 [details]
Samba4 patch which breaks FDS in selftest

Comment 2 Andrew Bartlett 2007-05-11 04:55:09 UTC
I should also note that attempting to introduce this error after the server had
started for the first time would result in an error, not a crash.

The server is not started in the inf file, with 'start_server= 0', so I wonder
if the very first load is presumed to be 'safe', having been generated by the
ds_newinst tool. 

Comment 5 Rich Megginson 2007-10-05 15:10:43 UTC
Andrew, have you tried to reproduce this problem with the latest Fedora DS 1.1?
 The way setup works now is quite different.

Comment 6 Andrew Bartlett 2007-10-16 06:38:16 UTC
A simple application of that patch to current SVN of Samba4 and current Fedora
DS doesn't crash.  I could retry with the older code, but we don't have
ds_newinst any more. 

Let's call this one fixed...

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