Bug 13244 - net ads search crashes when tokengroups attribute is requested
Summary: net ads search crashes when tokengroups attribute is requested
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-24 00:58 UTC by Jeremy Allison
Modified: 2020-08-14 01:59 UTC (History)
3 users (show)

See Also:


Attachments
Proposed git-am fix for master. (1.19 KB, patch)
2018-01-24 22:21 UTC, Jeremy Allison
no flags Details
git-am fix for 4.8.0rcNext, 4.7.next, 4.6.next. (1.49 KB, patch)
2018-01-31 00:55 UTC, Jeremy Allison
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2018-01-24 00:58:35 UTC
Valgrind backtrace from the samba-technical list.

There's no case where ads_do_search_retry_internal() should destroy
the passed in ADS_STRUCT *ads struct. Patch to follow - 

==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354E7: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6762711: ads_disconnect (ldap.c:756)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c368 is 296 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354EA: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6762711: ads_disconnect (ldap.c:756)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c370 is 304 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354EE: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6762711: ads_disconnect (ldap.c:756)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c378 is 312 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354F2: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6762711: ads_disconnect (ldap.c:756)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c380 is 320 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C35514: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6762711: ads_disconnect (ldap.c:756)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c3e8 is 424 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C35534: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6762711: ads_disconnect (ldap.c:756)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c3f0 is 432 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354E7: memset (vg_replace_strmem.c:1239)
==26914==    by 0x676272D: ads_disconnect (ldap.c:757)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c300 is 192 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354EA: memset (vg_replace_strmem.c:1239)
==26914==    by 0x676272D: ads_disconnect (ldap.c:757)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c308 is 200 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354EE: memset (vg_replace_strmem.c:1239)
==26914==    by 0x676272D: ads_disconnect (ldap.c:757)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c310 is 208 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354F2: memset (vg_replace_strmem.c:1239)
==26914==    by 0x676272D: ads_disconnect (ldap.c:757)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c318 is 216 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C35514: memset (vg_replace_strmem.c:1239)
==26914==    by 0x676272D: ads_disconnect (ldap.c:757)
==26914==    by 0x677110E: ads_destroy (ads_struct.c:188)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c360 is 288 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x6771116: ads_destroy (ads_struct.c:190)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c248 is 8 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x6771148: ads_destroy (ads_struct.c:191)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c250 is 16 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x677117A: ads_destroy (ads_struct.c:192)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c258 is 24 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x67711AC: ads_destroy (ads_struct.c:194)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c268 is 40 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x67711DE: ads_destroy (ads_struct.c:195)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c270 is 48 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x6771210: ads_destroy (ads_struct.c:196)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c278 is 56 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x6771242: ads_destroy (ads_struct.c:197)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c280 is 64 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x6771274: ads_destroy (ads_struct.c:198)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c290 is 80 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x67712A6: ads_destroy (ads_struct.c:200)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c2b8 is 120 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x67712D8: ads_destroy (ads_struct.c:201)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c2c0 is 128 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x6771313: ads_destroy (ads_struct.c:202)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c2c8 is 136 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x677134E: ads_destroy (ads_struct.c:203)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c2d0 is 144 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x6771389: ads_destroy (ads_struct.c:204)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c2d8 is 152 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x67713C4: ads_destroy (ads_struct.c:205)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c2e8 is 168 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid read of size 8
==26914==    at 0x67713FF: ads_destroy (ads_struct.c:206)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c2f0 is 176 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354E7: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6771457: ads_destroy (ads_struct.c:208)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c240 is 0 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354EA: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6771457: ads_destroy (ads_struct.c:208)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c248 is 8 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354EE: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6771457: ads_destroy (ads_struct.c:208)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c250 is 16 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914== Invalid write of size 8
==26914==    at 0x4C354F2: memset (vg_replace_strmem.c:1239)
==26914==    by 0x6771457: ads_destroy (ads_struct.c:208)
==26914==    by 0x148DC3: net_ads_search (net_ads.c:2446)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Address 0x1c40c258 is 24 bytes inside a block of size 448 free'd
==26914==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==26914==    by 0x6771478: ads_destroy (ads_struct.c:211)
==26914==    by 0x6774348: ads_do_search_retry_internal (ldap_utils.c:110)
==26914==    by 0x67745E5: ads_do_search_retry (ldap_utils.c:146)
==26914==    by 0x148D44: net_ads_search (net_ads.c:2441)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==  Block was alloc'd at
==26914==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==26914==    by 0x8474024: smb_xmalloc_array (util.c:1625)
==26914==    by 0x6770FCD: ads_init (ads_struct.c:140)
==26914==    by 0x1422EF: ads_startup_int (net_ads.c:263)
==26914==    by 0x142705: ads_startup (net_ads.c:354)
==26914==    by 0x148CDA: net_ads_search (net_ads.c:2434)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x14AE6E: net_ads (net_ads.c:3473)
==26914==    by 0x1899BC: net_run_function (net_util.c:508)
==26914==    by 0x1414EF: main (net.c:1124)
==26914==
==26914==
==26914== HEAP SUMMARY:
==26914==     in use at exit: 134,278 bytes in 508 blocks
==26914==   total heap usage: 174,406 allocs, 173,898 frees, 10,428,758 bytes allocated
==26914==
==26914== LEAK SUMMARY:
==26914==    definitely lost: 915 bytes in 6 blocks
==26914==    indirectly lost: 44,127 bytes in 192 blocks
==26914==      possibly lost: 65,328 bytes in 167 blocks
==26914==    still reachable: 23,908 bytes in 143 blocks
==26914==         suppressed: 0 bytes in 0 blocks
==26914== Rerun with --leak-check=full to see details of leaked memory
==26914==
==26914== For counts of detected and suppressed errors, rerun with: -v
==26914== ERROR SUMMARY: 107 errors from 34 contexts (suppressed: 0 from 0)
Comment 1 Jeremy Allison 2018-01-24 22:21:41 UTC
Created attachment 13927 [details]
Proposed git-am fix for master.

Hopefully gets around the objections that the initial patch may cause winbindd memory leaks.
Comment 2 Jeremy Allison 2018-01-31 00:55:11 UTC
Created attachment 13936 [details]
git-am fix for 4.8.0rcNext, 4.7.next, 4.6.next.

Cherry-pick from master. Applies cleanly to 4.8.0rc, 4.7.next, 4.6.next.
Comment 3 Ralph Böhme 2018-03-15 21:40:26 UTC
Reassigning to Karolin for inclusion in 4.8, 4.7 and 4.6.
Comment 4 Karolin Seeger 2018-03-22 20:42:14 UTC
(In reply to Ralph Böhme from comment #3)
Pushed to autobuild-v4-[8,7,6]-test
Comment 5 Karolin Seeger 2018-04-10 07:20:22 UTC
Pushed to v4-8-test and v4-7-test, re-trying autobuild-v4-6-test.
Comment 6 Karolin Seeger 2018-04-12 06:44:40 UTC
(In reply to Karolin Seeger from comment #5)
Pushed to all branches.
Closing out bug report.

Thanks!