Bug 31078 - assertion failure in dhcpd
assertion failure in dhcpd
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: DHCP
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Philipp Hahn
Stefan Gohmann
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-17 11:19 CEST by Sönke Schwardt-Krummrich
Modified: 2017-04-04 18:28 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2013-04-17 11:19:43 CEST
DC Master with UCS 3.1-0 errata 85 + UCS@school multi server + DHCP server + UCC:

ps shows an assertion error in dhcpd:

 1061 ?        S      0:09 runsvdir -P /etc/service log: .........................................................................................................................................................................................................................................dhcpd: getentry.c:36: ldap_first_entry: Assertion `chain != ((void *)0)' failed.?dhcpd: getentry.c:36: ldap_first_entry: Assertion `chain != ((void *)0)' failed.?

Package versions:
isc-dhcp-client      4.1.1-P1-15.19.201211131616 
isc-dhcp-common      4.1.1-P1-15.19.201211131616 
isc-dhcp-server      4.1.1-P1-15.19.201211131616 
isc-dhcp-server-ldap 4.1.1-P1-15.19.201211131616 
univention-dhcp      7.0.1-1.515.201210101440
Comment 1 Philipp Hahn univentionstaff 2016-12-19 10:07:54 CET
This happens when the LDAP server can't be reached during startup of isc-dhcpd, for example during an upgrade.

The underlying problem is, that set_ldap_real_base_dn() does no error checking:
143 +    status = ldap_search_ext_s(ld, "", scope, filter, attrs, 0, NULL, NULL, NULL, 0, &res);

The not running local slapd is not detected, as the no synchronous command is run first:
- the connection is un-encrypted
- authentication is only done later

There also is a memory leak:
  ldap_msgfree(res);

r17021 | Bug #31078 dhcp: add error handling / fix memory leak

Package: isc-dhcp
Version: 4.3.1-6+deb8u2A~4.2.0.201612190954
Branch: ucs_4.2-0

r75362 | Bug #31078 dhcp: add error handling / fix memory leak
Comment 2 Philipp Hahn univentionstaff 2016-12-19 11:01:51 CET
r17022 | Bug #31078 dhcp: add error handling / fix memory leak
 free_ber_buf() -> free_ber() NOT buf 

Package: isc-dhcp
Version: 4.3.1-6+deb8u2A~4.2.0.201612191043
Branch: ucs_4.2-0
Comment 3 Stefan Gohmann univentionstaff 2017-02-02 07:49:15 CET
Code review: OK

Tests: OK

Changelog: OK
Comment 4 Stefan Gohmann univentionstaff 2017-04-04 18:28:36 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".