Bug 675113 - ns-slapd core dump in windows_tot_run if oneway sync is used
Summary: ns-slapd core dump in windows_tot_run if oneway sync is used
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Sync Service
Version: 1.2.8
Hardware: Unspecified
OS: Other
unspecified
high
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 639035 389_1.2.8 677465
TreeView+ depends on / blocked
 
Reported: 2011-02-04 11:06 UTC by Carsten Grzemba
Modified: 2015-12-07 16:39 UTC (History)
1 user (show)

(edit)
Clone Of:
: 677465 (view as bug list)
(edit)
Last Closed: 2015-12-07 16:39:04 UTC


Attachments (Terms of Use)

Description Carsten Grzemba 2011-02-04 11:06:39 UTC
Description of problem:
if oneway Win sync 'fromWindows' is configured, windows_tot_run can core dump because uninitializied pointer dn and pb will freed.

Version-Release number of selected component (if applicable):
1.2.8.a1


How reproducible:
Setup winsync, oneway, fromWindows.


Steps to Reproduce:
1. Initialize Replica
2.
3.
  
Actual results:
ns-slapd core dump
The problem was observed in Solaris.


Expected results:


Additional info:
the pointer dn and pb have to initialized with NULL:

*** windows_tot_protocol.c      Fr Feb  4 11:55:46 2011
--- windows_tot_protocol.c.0    Mo Jan 10 11:45:26 2011
***************
*** 98,105 ****
  {
        int rc;
        callback_data cb_data;
!       Slapi_PBlock *pb = NULL;
!       char* dn = NULL;
        RUV *ruv = NULL;
        RUV *starting_ruv = NULL;
        Replica *replica = NULL;
--- 98,105 ----
  {
        int rc;
        callback_data cb_data;
!       Slapi_PBlock *pb;
!       char* dn;
        RUV *ruv = NULL;
        RUV *starting_ruv = NULL;
        Replica *replica = NULL;

Comment 1 Rich Megginson 2011-02-14 19:26:39 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   82b3621..cee5f05  master -> master
commit cee5f058e10b6379d12b643e03eed81ee22a937d
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Mon Feb 14 12:21:19 2011 -0700
    Author: Carsten Grzemba <grzemba@contac-dt.de>
    Reviewed by: rmeggins
    Branch: master
    Fix Description: Init pb and dn to NULL to avoid free of uninit memory.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no
To ssh://git.fedorahosted.org/git/389/ds.git
   8a15fd4..b6871e9  389-ds-base-1.2.8 -> 389-ds-base-1.2.8
commit b6871e9130c6c78d45d21f5019e3afb19fc2ea6f
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Mon Feb 14 12:21:19 2011 -0700

Comment 2 Amita Sharma 2011-05-03 10:29:59 UTC
VERIFIED


Note You need to log in before you can comment on or make changes to this bug.