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@openldap.org Reporter: 1489378385@qq.com Target Milestone: ---
URL: https://github.com/openldap/openldap/blob/8afcbe9e04f1a40f03cea51c57418b05f8...
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.
https://bugs.openldap.org/show_bug.cgi?id=10544
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID
--- Comment #1 from Howard Chu hyc@openldap.org --- Feature is incomplete work-in-progress. Nobody uses that yet.
https://bugs.openldap.org/show_bug.cgi?id=10544
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Keywords|needs_review |