https://bugs.openldap.org/show_bug.cgi?id=10546
Issue ID: 10546
Summary: ldap_explode_dn result is not released in the
interactive test client
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: 1489378385(a)qq.com
Target Milestone: ---
URL:
https://github.com/openldap/openldap/blob/8afcbe9e04f1a40f03cea51c57418b05f…
Description:
Source revision:
8afcbe9e04f1a40f03cea51c57418b05f86e8f44
Affected file:
libraries/libldap/test.c
Affected lines:
472-478
Source-level observation:
The interactive test client's E command calls ldap_explode_dn() and stores
the returned NULL-terminated array in exdn. It prints the array elements and
then leaves the switch case without releasing exdn.
According to ldap_get_dn(3), the result returned by ldap_explode_dn() should
be released with ldap_value_free().
The only reference to the allocated array is overwritten the next time the E
command is executed.
Steps to verify:
1. Build the libraries/libldap interactive test client with AddressSanitizer
or LeakSanitizer enabled.
2. Start the test client.
3. Execute the E command and enter a valid DN, for example:
cn=test,dc=example,dc=com
4. Repeat the E command several times.
5. Exit the client and inspect the sanitizer report or monitor its memory use.
Actual result:
Each E command allocates an exploded DN array that remains allocated until
the process terminates.
Expected result:
The exploded DN array should be released after all of its elements have been
printed.
Impact:
Repeated use of the E command increases the test client's memory consumption.
Validation status:
Confirmed by source review at the revision above. Runtime sanitizer validation
is pending.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10545
Issue ID: 10545
Summary: urltest leaks the parsed LDAPURLDesc and reconstructed
URL string
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: 1489378385(a)qq.com
Target Milestone: ---
URL:
https://github.com/openldap/openldap/blob/8afcbe9e04f1a40f03cea51c57418b05f…
Description:
Source revision:
8afcbe9e04f1a40f03cea51c57418b05f86e8f44
Affected file:
libraries/libldap/urltest.c
Affected lines:
75 and 125-127
Source-level observation:
On a successful call, ldap_url_parse() allocates an LDAPURLDesc and stores it
in lud. The program reaches its final return without calling
ldap_free_urldesc(lud).
There is also a second allocation on line 125:
fprintf(stdout, "URL: %s\n", ldap_url_desc2str(lud));
ldap_url_desc2str() allocates its returned string with LDAP_MALLOC. Because
the return value is passed directly to fprintf(), its pointer is lost and the
string cannot be released.
Steps to verify:
1. Build libraries/libldap/urltest with AddressSanitizer or LeakSanitizer.
2. Run it with a valid URL, for example:
./urltest 'ldap://localhost/dc=example,dc=com??sub?(objectClass=*)'
3. Allow the program to exit successfully.
4. Inspect the sanitizer report.
Actual result:
A successful invocation exits without releasing either the LDAPURLDesc or
the string returned by ldap_url_desc2str().
Expected result:
Both allocations should be released before returning from main().
Impact:
Each successful run leaves two process-lifetime allocations. The practical
impact is low because urltest is a short-lived test utility, but the ownership
contracts are not followed and leak detectors report the allocations.
Validation status:
Confirmed by source review at the revision above. Runtime sanitizer validation
is pending.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10544
Issue ID: 10544
Summary: slapd-bind parses the -B search URL but neither uses
nor frees it
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: test suite
Assignee: bugs(a)openldap.org
Reporter: 1489378385(a)qq.com
Target Milestone: ---
URL:
https://github.com/openldap/openldap/blob/8afcbe9e04f1a40f03cea51c57418b05f…
Description:
Source revision:
8afcbe9e04f1a40f03cea51c57418b05f86e8f44
Affected file:
tests/progs/slapd-bind.c
Affected lines:
98, 116-143, and 182-190
Source-level observation:
When -B search=<LDAP URL> is supplied, ldap_url_parse() allocates an
LDAPURLDesc and stores it in extra_ludp.
After parsing, extra_ludp is not referenced again. In particular, the calls
to do_base() and do_bind() pass an action type of -1 and an action pointer of
NULL instead of passing TESTER_SEARCH and extra_ludp.
The descriptor is also not released before exit(EXIT_SUCCESS).
Steps to verify:
1. Build slapd-bind with AddressSanitizer or LeakSanitizer.
2. Run slapd-bind with the required connection arguments and a valid option
such as:
-B 'search=ldap:///dc=example,dc=com??sub?(objectClass=*)'
3. Allow the tester to complete normally.
4. Check whether the requested search action is performed.
5. Inspect the sanitizer report for the LDAPURLDesc allocated by
ldap_url_parse().
Actual result:
The URL is successfully parsed, but the resulting descriptor is neither used
by the bind operation nor released before the process exits.
Expected result:
The parsed search action should be passed to the relevant test operation and
the LDAPURLDesc should be released after the outer test loop completes.
Impact:
The -B search option appears to have no effect and leaves one LDAPURLDesc
allocated until process termination.
Validation status:
Confirmed by source review at the revision above. Runtime behavior and
sanitizer validation are pending.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10543
Issue ID: 10543
Summary: slapd-read frees the DN pointer array but not the
ldap_get_dn() strings
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: test suite
Assignee: bugs(a)openldap.org
Reporter: 1489378385(a)qq.com
Target Milestone: ---
URL:
https://github.com/openldap/openldap/blob/8afcbe9e04f1a40f03cea51c57418b05f…
Description:
Source revision:
8afcbe9e04f1a40f03cea51c57418b05f86e8f44
Affected file:
tests/progs/slapd-read.c
Affected lines:
204-232
Source-level observation:
do_random() allocates the values pointer array with malloc(). It then calls
ldap_get_dn() once for every LDAP search result and stores each independently
allocated DN string in values[i].
After the read loop, the code calls:
free(values);
This releases only the pointer array. It does not release any of the strings
returned by ldap_get_dn().
The ldap_get_dn(3) documentation states that its returned string is dynamically
allocated and should be released with ldap_memfree().
Steps to verify:
1. Build slapd-read with AddressSanitizer or LeakSanitizer.
2. Run it with a search filter so that do_random() is used.
3. Use a search base containing multiple matching entries.
4. Run multiple outer iterations if possible.
5. Allow the tester to exit and inspect the sanitizer report.
Actual result:
One DN string remains allocated for every entry returned by each search batch.
Only the surrounding values array is freed.
Expected result:
Every non-NULL value returned by ldap_get_dn() should be released before the
values array is freed.
Impact:
The leak scales with the number of matching entries and the number of outer
test iterations. Long or repeated test runs can accumulate substantially more
memory than the other three findings.
Validation status:
Confirmed by source review at the revision above. Runtime sanitizer validation
is pending.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10542
Issue ID: 10542
Summary: On Windows, allow using previous write behavior
Product: LMDB
Version: 1.0.0
Hardware: All
OS: Windows
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: liblmdb
Assignee: bugs(a)openldap.org
Reporter: hyc(a)openldap.org
Target Milestone: ---
ITS#9017 changed write behavior in Windows to use WRITE_THROUGH writes and
eliminate use of FlushFileBuffers(). Supposedly this yields faster write
performance because flushes are very slow. However, other users report this
approach is actually much slower than LMDB 0.9.
Add a compile-time flag to revert to the original write behavior.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10541
Issue ID: 10541
Summary: syncrepl regression with older format of entryCSN
Product: OpenLDAP
Version: 2.6.13
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: slapd
Assignee: bugs(a)openldap.org
Reporter: benp(a)reed.edu
Target Milestone: ---
We recently upgraded from openldap 2.6.10 to 2.6.13 (using debian packages from
symas.com). Subsequent to the upgrade we noticed that syncrepl was sometimes
failing to replicate changes to entries.
It appears that the behavior is triggered when modifying an entry with an older
style entryCSN (eg "entryCSN: 20210115230536Z#000001#00#000000" vs the current
style "entryCSN: 20260715174316.844052Z#000000#001#000000"). The updated entry
on the provider slapd gets a new entryCSN that uses the new format, but the
consumer slapds don't process the changes made to the entry, and log a failed
assertion (122) error like this:
Jul 8 10:39:28 slapd-c daemon.info slapd[129831]: 6a3f4436.0d08671e
0x7f6d411fc6c0 syncrepl_entry: rid=011 be_modify
uid=example-user,ou=People,dc=foo,dc=bar (122)
Deleting the problematic entry on the provider and then recreating it tends to
resolve the issue for us, presumably because the new entry has the normal
non-obsolete contextCSN attribute.
Our current production DB has ~22k entries, ~4k of which have older style
contextCSNs, so we'd love to avoid having to delete and recreate those ~4k
entries if we don't have to.
We have entryCSNs in at least 3 different formats:
entryCSN: 2003081423:11:31Z#0x000d#0#0000
entryCSN: 20230410142047Z#000000#00#000000
entryCSN: 20260313112653.221151Z#000000#001#000000
Our current configuration does not use accesslog, so replication is simple
syncrepl (vs delta-syncrepl).
It was suggested on the openldap-technical list that we consider filing an ITS
about this issue. Please let me know what additional supporting information
would be helpful. I'm not totally certain how to distill are slapd.d style
config to something concise enough for the bug tracker.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10536
Issue ID: 10536
Summary: Re-fix ITS#8174 mdb_drop(MAIN_DBI)
Product: LMDB
Version: 1.0.0
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: liblmdb
Assignee: bugs(a)openldap.org
Reporter: hyc(a)openldap.org
Target Milestone: ---
The patch breaks mdb_drop() usability.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10509
Issue ID: 10509
Summary: 2.7: Feature notes for announcement file
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: documentation
Assignee: bugs(a)openldap.org
Reporter: quanah(a)openldap.org
Target Milestone: ---
Add feature notes for the 2.7 announcement file
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10490
Issue ID: 10490
Summary: Bump library minor version(s)
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: ondra(a)mistotebe.net
Target Milestone: ---
Tracking bug for 2.7 branchpoint if we expose new interfaces in either library.
--
You are receiving this mail because:
You are on the CC list for the issue.