[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: dnMatch/uniqueMemberMatch core dump (ITS#3247)



Pierangelo Masarati writes:
> Can you produce a backtrace?

$ ./run -b ldbm test014-whoami 
...
Testing ldapwhoami as cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com for u:group/itd staff (dn.subtree)...
dn:cn=itd staff,ou=groups,dc=example,dc=com
Testing ldapwhoami as cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com for u:fail (URI; should fail)...
Result: Proxy Authorization Failure (47)
Testing ldapwhoami as cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com for dn:cn=Should Fail,dc=example,dc=com (URI; should fail)...
Result: Proxy Authorization Failure (47)
Testing ldapwhoami as cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com for dn: (no authzTo; should fail)...
Result: Can't contact LDAP server (-1)
12817 Segmentation Fault - core dumped

(gdb) bt
#0  0xfef33218 in strlen () from /usr/lib/libc.so.1
#1  0xfef86520 in _doprnt () from /usr/lib/libc.so.1
#2  0xfef88414 in vfprintf () from /usr/lib/libc.so.1
#3  0x000b892c in lutil_log_int (file=0x122440, subsys=0xfefc3a54 "", level=7, 
    fmt=0xc4c88 "dnMatch: %d\n    %s\n    %s\n", vl=0xfc8011c0) at debug.c:206
#4  0x000b898c in lutil_log (subsys=24, level=7, 
    fmt=0xc4c88 "dnMatch: %d\n    %s\n    %s\n") at debug.c:221
#5  0x0003c3e8 in dnMatch (matchp=0xfc801350, flags=0, syntax=0x1250a8, 
    mr=0x1295d8, value=0xfc801248, assertedValue=0x1c) at dn.c:988
#6  0x000510fc in uniqueMemberMatch (matchp=0xfc801350, flags=0, 
    syntax=0x1250a8, mr=0x1295d8, value=0x2ff4b8, assertedValue=0x420d18)
    at schema_init.c:1151
#7  0x00040980 in value_match (match=0xfc801350, ad=0x1336f8, mr=0x1295d8, 
    flags=0, v1=0x2ff4b8, v2=0x420d18, text=0xfc801354) at value.c:225
#8  0x00042b5c in test_ava_filter (op=0xfc801620, e=0x2a9728, ava=0x420d14, 
    type=163) at filterentry.c:438
#9  0x000423cc in test_filter (op=0xfc801620, e=0x2a9728, f=0x420d34)
    at filterentry.c:130
#10 0x00042e2c in test_filter_and (op=0xfc801620, e=0x2a9728, flist=0x420d34)
    at filterentry.c:544
#11 0x00042420 in test_filter (op=0xfc801620, e=0x2a9728, f=0x420d44)
    at filterentry.c:139
#12 0x00071fd0 in ldbm_back_search (op=0xfc801620, rs=0xfc8015e8)
    at search.c:397
#13 0x0005b438 in slap_sasl_match (opx=0x300068, rule=0x41d054, 
    assertDN=0xfc801970, authc=0x300168) at saslauthz.c:1059
#14 0x0005af84 in slap_sasl_matches (op=0x300068, rules=0x41d03c, 
    assertDN=0xfc801970, authc=0x300168) at saslauthz.c:845
#15 0x0005b584 in slap_sasl_check_authz (op=0x300068, searchDN=0x300168, 
    assertDN=0xfc801970, ad=0x12cda8, authc=0x300168) at saslauthz.c:1117
#16 0x0005ba9c in slap_sasl_authorized (op=0x300068, authcDN=0x300168, 
    authzDN=0xfc801970) at saslauthz.c:1321
#17 0x0004c3c0 in parseProxyAuthz (op=0x300068, rs=0xfc801af8, ctrl=0x41cfec)
    at controls.c:793
#18 0x0004bf00 in get_ctrls (op=0x300068, rs=0xfc801af8, sendres=1)
    at controls.c:609
#19 0x0004d304 in do_extended (op=0x300068, rs=0xfc801af8) at extended.c:219
#20 0x0002d478 in connection_operation (ctx=0xfc801ba8, arg_v=0x300068)
    at connection.c:1083
#21 0x00095e20 in ldap_int_thread_pool_wrapper (xpool=0x131a30) at tpool.c:467

(gdb) frame 5
#5  0x0003c3e8 in dnMatch (matchp=0xfc801350, flags=0, syntax=0x1250a8, 
    mr=0x1295d8, value=0xfc801248, assertedValue=0x1c) at dn.c:988
988                     match, value->bv_val, asserted->bv_val  );
(gdb) print asserted->bv_val
$1 = 0x0
(gdb) print value->bv_val
$2 = 0x133658 "cn=manager,dc=example,dc=com"

(gdb) frame 6
#6  0x000510fc in uniqueMemberMatch (matchp=0xfc801350, flags=0, 
    syntax=0x1250a8, mr=0x1295d8, value=0x2ff4b8, assertedValue=0x420d18)
    at schema_init.c:1151
1151            return dnMatch( matchp, flags, syntax, mr, &valueDN, &assertedDN );
(gdb) print assertedDN
$3 = {bv_len = 0, bv_val = 0x0}
(gdb) print *(struct berval *)assertedValue
$4 = {bv_len = 0, bv_val = 0x420d2c ""}
(gdb) print *value
$6 = {bv_len = 28, bv_val = 0x133658 "cn=manager,dc=example,dc=com"}

-- 
Hallvard