[prev in list] [next in list] [prev in thread] [next in thread]
List: openldap-bugs
Subject: Re: (ITS#7641) slapd crashes in slapd_free_controls when syncrepl enabled and plugins in use
From: hyc () symas ! com
Date: 2013-07-26 20:17:13
Message-ID: 201307262017.r6QKHDCp090826 () boole ! openldap ! org
[Download RAW message or body]
kb9vqf@pearsoncomputing.net wrote:
> Full_Name: Timothy Pearson
> Version: 2.4.35
> OS: Debian Wheezy
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (131.156.2.26)
>
>
> slapd sporadically crashes in slapd_free_controls when syncrepl enabled and
> plugins are in use. The crash is caused by an invalid free in the slapi
> overlay; it only occurs on the provider in a syncrepl setup. This is the
> backtrace:
>
> This patch fixes the problem:
Looks good, thanks. Committed to master.
> --- servers/slapd/slapi/slapi_overlay.c
> +++ servers/slapd/slapi/slapi_overlay.c
> @@ -454,11 +454,11 @@
> n_slapi_ctrls = slapi_int_count_controls( slapi_ctrls );
> n_rs_ctrls = slapi_int_count_controls( rs->sr_ctrls );
>
> - slapi_pblock_set( pb, SLAPI_X_OLD_RESCONTROLS, (void *)rs->sr_ctrls );
> -
> if ( n_slapi_ctrls == 0 )
> return LDAP_SUCCESS; /* no SLAPI controls */
>
> + slapi_pblock_set( pb, SLAPI_X_OLD_RESCONTROLS, (void *)rs->sr_ctrls );
> +
> ctrls = (LDAPControl **) op->o_tmpalloc(
> ( n_slapi_ctrls + n_rs_ctrls + 1 ) * sizeof(LDAPControl *),
> op->o_tmpmemctx );
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic