Bug 43720 - SIGSEGV univention-policy: notifier_client_new(lp->host=NULL) with -H <URI>
Summary: SIGSEGV univention-policy: notifier_client_new(lp->host=NULL) with -H <URI>
Status: RESOLVED WONTFIX
Alias: None
Product: UCS
Classification: Unclassified
Component: LDAP
Version: UCS 4.2
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UCS maintainers
QA Contact: UCS maintainers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-06 08:49 CET by Philipp Hahn
Modified: 2020-07-03 20:54 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.040
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2017-03-06 08:49:10 CET
Is "udl -H <URI>" is used, connecting to the UDN fails as ld->host is not initialized and strdup(NULL) crahes UDL with SIGSEGV:

# gdb --args univention-directory-listener -F -H ldap://localhost:7389 -x -D $(ucr get ldap/hostdn) -y /etc/machine.secret -m /usr/lib/univention-directory-listener/system-g -d 2
(gdb) bt
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff652c97e in __GI___strdup (s=0x0) at strdup.c:41
#2  0x00000000004095d5 in notifier_client_new (client=0x6177c0 <global_client>, server=<optimized out>, starttls=<optimized out>) at network.c:326
#3  0x000000000040488f in do_connection (lp=<optimized out>) at main.c:322
#4  main (argc=-11088, argv=0x413268) at main.c:519

main.c:322 »···if (notifier_client_new(NULL, lp->host, 1) != 0)  

main.c (or base/univention-policy/lib/ldap.c) should use ldap_url_parse() to parse the URL and fill lp->host.

maybe ldap_set_urllist_proc() should also be used to track the preferred server.

PS: ldapi:/// with -Y EXTERNAL is also not supported
Comment 1 Ingo Steuwer univentionstaff 2020-07-03 20:54:07 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.