Report information
The Basics
Id:
41185
Status:
resolved
Estimated:
5 hours (300 minutes)
Worked:
30 minutes
Users:
tmark: 30 minutes
Left:
4 hours (240 minutes)
Priority:
Low/Low
Queue:

BugTracker
Version Fixed:
4.4.0 4.3.6 4.1-ESV-R15
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
4.4.0 4.3.6 4.1-ESV-R15
Priority:
P2 Normal
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
DHCP Server
Area:
bug

Dates
Created:Fri, 27 Nov 2015 13:26:31 -0500
Updated:Tue, 12 Dec 2017 07:40:59 -0500
Closed:Tue, 20 Jun 2017 07:23:19 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: DHCP 4.3.x - Add log_error msg to function 'client_envadd' in DHCP-4.3.3
Date: Fri, 27 Nov 2015 18:26:29 +0000
To: dhcp-bugs@isc.org
From: "Bill Parker" <wp02855@gmail.com>
Bug Report from www.isc.org: Name: Bill Parker Email: wp02855@gmail.com Software Version: DHCP 4.3.x OS: Linux/Unix/MacOS/All Subject:Add log_error msg to function 'client_envadd' in DHCP-4.3.3 Bug Detail =========== Hello All, In reviewing source code in dhcp-4.3.3, I found in sub-directory 'client', file 'dhclient.c', in function 'client_envadd', if dmalloc() fails, the function simply returns, but in all other calls to dmalloc() in this file, a log_error() or log_fatal() is sent. The patch file below adds a log_error() for the dmalloc() in function 'client_envadd': --- dhclient.c.orig 2015-11-26 10:12:36.222132191 -0800 +++ dhclient.c 2015-11-26 10:13:43.891732649 -0800 @@ -3578,8 +3578,10 @@ val = dmalloc (strlen (prefix) + strlen (name) + 1 /* = */ + len + sizeof *val, MDL); - if (!val) + if (!val) { + log_error ("No memory for client add environment."); return; + } s = val -> string; strcpy (s, prefix); strcat (s, name); ======================================================================= In sub-directory 'common', file 'discovery.c', there is a call to dmalloc() which simply returns in the event of failure in function 'interface_stash', but all other calls to dmalloc() have a(n) log_fatal or log_error associated with them. The patch file below adds a 'log_error' warning to function 'interface_stash': --- discover.c.orig 2015-11-26 10:37:14.287986760 -0800 +++ discover.c 2015-11-26 10:39:07.579385515 -0800 @@ -1825,8 +1825,10 @@ delta = tptr -> index - interface_max + 10; vec = dmalloc ((interface_max + delta) * sizeof (struct interface_info *), MDL); - if (!vec) + if (!vec) { + log_error("no space for interface stash."); return; + } memset (&vec [interface_max], 0, (sizeof (struct interface_info *)) * delta); interface_max += delta; My question is, should this be treated as a 'log_fatal' rather than simply returning? ======================================================================= A 'make' of the above patch files results in a clean compile/build. Bill Parker (wp02855 at gmail dot com) --- This email was received through isc.org Bug Submission Form All information within this email is considered confidential and for internal use only.
Hi Bill, Thank you for your report. Realistically if either of these are happening the system is probably going to die from other attempts to get memory so the exact error report probably isn't a big deal. The first one should probably be a error as you have suggested. The second one is a bit iffier. We currently don't die on the error but it's difficult to imagine how the server is going to be able to run successfully if it is already getting memory issues trying to simply discover it's interfaces. In any case I'll think about it some more. I'm not sure when we might get to these issues, they are small but they are also not that likely to occur. regards, Shawn