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

Re: (ITS#4180) slapd (back-sql) hangs/segfaults on SASL bind



On Tue, 2005-11-22 at 22:55 +0000, Nels@maei.ca wrote:

> (gdb) p auxvals
> $17 = {{name = 0x811f224 "*slapConn", values = 0x90761b4, nvalues = 1, 
>     valsize = 4}, {name = 0x811f22e "*slapAuthcDN", values = 0x90761bc, 
>     nvalues = 1, valsize = 8}, {name = 0x811f23b "*slapAuthzDN", 
>     values = 0x90761d4, nvalues = 1, valsize = 6}}
> (gdb) p auxvals[1].values[0]
> $18 = 0x9076612 "\035"

Sorry, in this case you should have looked at 
(gdb) p auxvals[2].values[0]

i.e. what is actually marked as the "*slapAuthzDN" (I might have asked
you the wrong index).  Can you check?  What I suspect is that some other
piece of code is setting that value instead of slapd.

> (gdb) p *((struct berval *)(((char **)0x90761bc)[0]))
> $19 = {bv_len = 29, bv_val = 0xb6c9f7a8 "cn=nels lindquist,o=maei,c=ca"}
> (gdb) p *((struct berval *)(((char **)0x90761d4)[0]))
> $20 = {bv_len = 1685217607, 
>   bv_val = 0x47006e65 <Address 0x47006e65 out of bounds>}
> 
> > The next step, assuming there's some buffer overflow somewhere, would be
> > to run slapd under valgrind or some other memory checker tool.
> 
> Some other odd things I noticed which may or may not provide clues:
> 
> When using a MySQL DSN for slapd-sql, the SASLv2 configuration file 
> is /usr/lib/sasl2/Slapd.conf (note the capitalization) as you might 
> expect.
> 
> When I switch to a PostgreSQL DSN for slapd-sql, Slapd.conf is 
> ignored and the configuration file must be renamed slapd.conf.
> 
> The location of the password store doesn't seem to matter; ie, I can 
> use either the MySQL database or the PostgreSQL database, and as long 
> as the LDAP data is in MySQL, everything works.  When I switch to a 
> postgres backend, it breaks regardless of whether the password store 
> is in MySQL or PostgreSQL.

I have no clue.

p.




Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------