[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#7641) slapd crashes in slapd_free_controls when syncrepl enabled and plugins in use
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#7641) slapd crashes in slapd_free_controls when syncrepl enabled and plugins in use
- From: hyc@symas.com
- Date: Fri, 26 Jul 2013 20:17:13 GMT
- Auto-submitted: auto-generated (OpenLDAP-ITS)
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/