~ubuntu-branches/ubuntu/hardy/openldap2.3/hardy-updates

« back to all changes in this revision

Viewing changes to servers/slapd/ctxcsn.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2008-07-31 16:06:53 UTC
  • mfrom: (16.1.3 hardy-proposed)
  • Revision ID: james.westby@ubuntu.com-20080731160653-np1dr19qfutmqb0v
Tags: 2.4.9-0ubuntu0.8.04.1
* SECURITY UPDATE: denial of service via broken BER decoding.
* Added debian/patches/security-ber-decoding.patch: upstream fixes.
* References
  CVE-2008-2952

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ctxcsn.c -- Context CSN Management Routines */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/ctxcsn.c,v 1.40.2.4 2007/08/31 23:13:58 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/ctxcsn.c,v 1.40.2.6 2008/02/12 00:44:15 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
 
 * Copyright 2003-2007 The OpenLDAP Foundation.
 
5
 * Copyright 2003-2008 The OpenLDAP Foundation.
6
6
 * Portions Copyright 2003 IBM Corporation.
7
7
 * All rights reserved.
8
8
 *
99
99
                if ( csne->ce_opid == op->o_opid && csne->ce_connid == op->o_connid ) {
100
100
                        LDAP_TAILQ_REMOVE( op->o_bd->be_pending_csn_list,
101
101
                                csne, ce_csn_link );
 
102
                        Debug( LDAP_DEBUG_SYNC, "slap_graduate_commit_csn: removing %p %s\n",
 
103
                                csne->ce_csn.bv_val, csne->ce_csn.bv_val, 0 );
102
104
                        if ( op->o_csn.bv_val == csne->ce_csn.bv_val ) {
103
105
                                BER_BVZERO( &op->o_csn );
104
106
                        }
162
164
 
163
165
        pending = (struct slap_csn_entry *) ch_calloc( 1,
164
166
                        sizeof( struct slap_csn_entry ));
 
167
 
 
168
        Debug( LDAP_DEBUG_SYNC, "slap_queue_csn: queing %p %s\n", csn->bv_val, csn->bv_val, 0 );
 
169
 
165
170
        ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp );
166
171
 
167
172
        ber_dupbv( &pending->ce_csn, csn );