SHA256
1
0
forked from pool/dhcp

- Update to dhcp-4.3.6-P1:

* CVE-2018-5733, bsc#1083303: reference count overflow in dhcpd.
  * CVE-2018-5732, bsc#1083302: buffer overflow bug in dhclient.
  * Plugged a socket descriptor leak in OMAPI
  * The server now allows the client identifier (option 61) to own
    leases in more than one subnet concurrently [ISC-Bugs #41358].
  * When replying to a DHCPINFORM, the server will now include
    options specified at the pool scope, provided the ciaddr field
    of the DHCPINFORM is populated.
    [ISC-Bugs #43219] [ISC-Bugs #45051].
  * When memory allocation fails in a repeated way the process
    writes "Run out of memory." on the standard error and exists
    with status 1  [ISC-Bugs #32744].
  * The new lmdb (Lightning Memory DataBase) bind9 configure
    option is now disabled by default to avoid the presence of
    this library to be detected which can lead to a link failure.
    [ISC-Bugs #45069]
  * The linux interface discovery code has been modified to use
    getifaddrs() as is done for BSD and OS-X.
    [ISC-Bugs #28761] and others.
  * Fixed a bug in OMAPI that causes omshell to crash when a
    name-value pair with a zero length value is shipped in an
    object [ISC-Bugs #29108].
  * On 64-bit platforms, dhclient now generates the correct value
    for the script environment variable, "expiry", the lease
    expiry value exceeds 0x7FFFFFFF [ISC-Bugs #43326].
  * Common timer logic was modified to cap the maximum timeout
    values at 0x7FFFFFFF - 1 [ISC-Bugs #28038].
  * DHCP6 FQDN option unpacking code now correctly handles values
    that contain spaces, special, or non-printable characters.

OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=186
This commit is contained in:
2018-03-08 13:53:43 +00:00
committed by Git OBS Bridge
parent 5a5d3d032e
commit e9398b14d9
14 changed files with 225 additions and 772 deletions

View File

@@ -8,11 +8,9 @@ Merged fixed close-on-exec patch (bnc#732910)
References: bnc#732910
Signed-off-by: Marius Tomaschewski <mt@suse.de>
diff --git a/client/clparse.c b/client/clparse.c
index 320c42f..b7e4251 100644
--- a/client/clparse.c
+++ b/client/clparse.c
@@ -221,7 +221,7 @@ int read_client_conf_file (const char *name, struct interface_info *ip,
--- client/clparse.c.orig
+++ client/clparse.c
@@ -262,7 +262,7 @@ int read_client_conf_file (const char *n
int token;
isc_result_t status;
@@ -21,7 +19,7 @@ index 320c42f..b7e4251 100644
return uerr2isc (errno);
cfile = NULL;
@@ -297,7 +297,7 @@ void read_client_leases ()
@@ -338,7 +338,7 @@ void read_client_leases ()
/* Open the lease file. If we can't open it, just return -
we can safely trust the server to remember our state. */
@@ -30,11 +28,9 @@ index 320c42f..b7e4251 100644
return;
cfile = NULL;
diff --git a/client/dhclient.c b/client/dhclient.c
index a077b48..ac36e3d 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -438,7 +438,7 @@ main(int argc, char **argv) {
--- client/dhclient.c.orig
+++ client/dhclient.c
@@ -565,7 +565,7 @@ main(int argc, char **argv) {
long temp;
int e;
@@ -43,7 +39,7 @@ index a077b48..ac36e3d 100644
e = fscanf(pidfd, "%ld\n", &temp);
oldpid = (pid_t)temp;
@@ -2840,7 +2840,7 @@ void rewrite_client_leases ()
@@ -3403,7 +3403,7 @@ void rewrite_client_leases ()
if (leaseFile != NULL)
fclose (leaseFile);
@@ -52,7 +48,7 @@ index a077b48..ac36e3d 100644
if (leaseFile == NULL) {
log_error ("can't create %s: %m", path_dhclient_db);
return;
@@ -3033,7 +3033,7 @@ write_duid(struct data_string *duid)
@@ -3598,7 +3598,7 @@ write_duid(struct data_string *duid)
return DHCP_R_INVALIDARG;
if (leaseFile == NULL) { /* XXX? */
@@ -61,7 +57,7 @@ index a077b48..ac36e3d 100644
if (leaseFile == NULL) {
log_error("can't create %s: %m", path_dhclient_db);
return ISC_R_IOERROR;
@@ -3081,7 +3081,7 @@ write_client6_lease(struct client_state *client, struct dhc6_lease *lease,
@@ -3643,7 +3643,7 @@ write_client6_lease(struct client_state
return DHCP_R_INVALIDARG;
if (leaseFile == NULL) { /* XXX? */
@@ -70,7 +66,7 @@ index a077b48..ac36e3d 100644
if (leaseFile == NULL) {
log_error("can't create %s: %m", path_dhclient_db);
return ISC_R_IOERROR;
@@ -3213,7 +3213,7 @@ int write_client_lease (client, lease, rewrite, makesure)
@@ -3802,7 +3802,7 @@ int write_client_lease (client, lease, r
return 1;
if (leaseFile == NULL) { /* XXX */
@@ -79,11 +75,9 @@ index a077b48..ac36e3d 100644
if (leaseFile == NULL) {
log_error ("can't create %s: %m", path_dhclient_db);
return 0;
diff --git a/common/bpf.c b/common/bpf.c
index 39d4f45..df9facc 100644
--- a/common/bpf.c
+++ b/common/bpf.c
@@ -95,7 +95,7 @@ int if_register_bpf (info)
--- common/bpf.c.orig
+++ common/bpf.c
@@ -94,7 +94,7 @@ int if_register_bpf (info)
for (b = 0; 1; b++) {
/* %Audit% 31 bytes max. %2004.06.17,Safe% */
sprintf(filename, BPF_FORMAT, b);
@@ -92,33 +86,9 @@ index 39d4f45..df9facc 100644
if (sock < 0) {
if (errno == EBUSY) {
continue;
diff --git a/common/discover.c b/common/discover.c
index 3cd64a7..37af780 100644
--- a/common/discover.c
+++ b/common/discover.c
@@ -415,7 +415,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
int len;
int i;
- ifaces->fp = fopen("/proc/net/dev", "r");
+ ifaces->fp = fopen("/proc/net/dev", "re");
if (ifaces->fp == NULL) {
log_error("Error opening '/proc/net/dev' to list interfaces");
return 0;
@@ -450,7 +450,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
#ifdef DHCPv6
if (local_family == AF_INET6) {
- ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
+ ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
if (ifaces->fp6 == NULL) {
log_error("Error opening '/proc/net/if_inet6' to "
"list IPv6 interfaces; %m");
diff --git a/common/dlpi.c b/common/dlpi.c
index c34adc3..944f21c 100644
--- a/common/dlpi.c
+++ b/common/dlpi.c
@@ -804,7 +804,7 @@ dlpiopen(const char *ifname) {
--- common/dlpi.c.orig
+++ common/dlpi.c
@@ -813,7 +813,7 @@ dlpiopen(const char *ifname) {
}
*dp = '\0';
@@ -127,10 +97,8 @@ index c34adc3..944f21c 100644
}
/*
diff --git a/common/nit.c b/common/nit.c
index 316e85f..6aa778b 100644
--- a/common/nit.c
+++ b/common/nit.c
--- common/nit.c.orig
+++ common/nit.c
@@ -75,7 +75,7 @@ int if_register_nit (info)
struct strioctl sio;
@@ -140,10 +108,8 @@ index 316e85f..6aa778b 100644
if (sock < 0)
log_fatal ("Can't open NIT device for %s: %m", info -> name);
diff --git a/common/resolv.c b/common/resolv.c
index 526cebf..2ac8d43 100644
--- a/common/resolv.c
+++ b/common/resolv.c
--- common/resolv.c.orig
+++ common/resolv.c
@@ -44,7 +44,7 @@ void read_resolv_conf (parse_time)
struct domain_search_list *dp, *dl, *nd;
isc_result_t status;
@@ -153,10 +119,8 @@ index 526cebf..2ac8d43 100644
log_error ("Can't open %s: %m", path_resolv_conf);
return;
}
diff --git a/common/upf.c b/common/upf.c
index 34011eb..77d5878 100644
--- a/common/upf.c
+++ b/common/upf.c
--- common/upf.c.orig
+++ common/upf.c
@@ -71,7 +71,7 @@ int if_register_upf (info)
/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
sprintf(filename, "/dev/pf/pfilt%d", b);
@@ -166,11 +130,9 @@ index 34011eb..77d5878 100644
if (sock < 0) {
if (errno == EBUSY) {
continue;
diff --git a/omapip/trace.c b/omapip/trace.c
index f4115c1..4410c35 100644
--- a/omapip/trace.c
+++ b/omapip/trace.c
@@ -138,10 +138,10 @@ isc_result_t trace_begin (const char *filename,
--- omapip/trace.c.orig
+++ omapip/trace.c
@@ -138,10 +138,10 @@ isc_result_t trace_begin (const char *fi
return DHCP_R_INVALIDARG;
}
@@ -183,7 +145,7 @@ index f4115c1..4410c35 100644
0600);
}
@@ -429,7 +429,7 @@ void trace_file_replay (const char *filename)
@@ -429,7 +429,7 @@ void trace_file_replay (const char *file
isc_result_t result;
int len;
@@ -192,11 +154,9 @@ index f4115c1..4410c35 100644
if (!traceinfile) {
log_error("Can't open tracefile %s: %m", filename);
return;
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
index 15b4997..9d39fae 100644
--- a/relay/dhcrelay.c
+++ b/relay/dhcrelay.c
@@ -558,13 +558,14 @@ main(int argc, char **argv) {
--- relay/dhcrelay.c.orig
+++ relay/dhcrelay.c
@@ -659,13 +659,14 @@ main(int argc, char **argv) {
if (no_pid_file == ISC_FALSE) {
pfdesc = open(path_dhcrelay_pid,
@@ -213,11 +173,9 @@ index 15b4997..9d39fae 100644
if (!pf)
log_error("Can't fdopen %s: %m",
path_dhcrelay_pid);
diff --git a/server/confpars.c b/server/confpars.c
index 4b2907d..6aa5b3f 100644
--- a/server/confpars.c
+++ b/server/confpars.c
@@ -111,7 +111,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
--- server/confpars.c.orig
+++ server/confpars.c
@@ -118,7 +118,7 @@ isc_result_t read_conf_file (const char
}
#endif
@@ -226,11 +184,9 @@ index 4b2907d..6aa5b3f 100644
if (leasep) {
log_error ("Can't open lease database %s: %m --",
path_dhcpd_db);
diff --git a/server/db.c b/server/db.c
index 0c642ad..e9a38fe 100644
--- a/server/db.c
+++ b/server/db.c
@@ -1072,7 +1072,7 @@ void db_startup (testp)
--- server/db.c.orig
+++ server/db.c
@@ -1081,7 +1081,7 @@ void db_startup (testp)
}
#endif
if (!testp) {
@@ -239,7 +195,7 @@ index 0c642ad..e9a38fe 100644
if (!db_file)
log_fatal ("Can't open %s for append.", path_dhcpd_db);
expire_all_pools ();
@@ -1120,7 +1120,7 @@ int new_lease_file ()
@@ -1129,7 +1129,7 @@ int new_lease_file ()
path_dhcpd_db) >= sizeof newfname)
log_fatal("new_lease_file: lease file path too long");
@@ -248,7 +204,7 @@ index 0c642ad..e9a38fe 100644
if (db_fd < 0) {
log_error ("Can't create new lease file: %m");
return 0;
@@ -1145,7 +1145,7 @@ int new_lease_file ()
@@ -1154,7 +1154,7 @@ int new_lease_file ()
}
#endif /* PARANOIA */
@@ -257,11 +213,9 @@ index 0c642ad..e9a38fe 100644
log_error("Can't fdopen new lease file: %m");
close(db_fd);
goto fdfail;
diff --git a/server/dhcpd.c b/server/dhcpd.c
index eecc89b..afef390 100644
--- a/server/dhcpd.c
+++ b/server/dhcpd.c
@@ -658,7 +658,7 @@ main(int argc, char **argv) {
--- server/dhcpd.c.orig
+++ server/dhcpd.c
@@ -760,7 +760,7 @@ main(int argc, char **argv) {
*/
if ((lftest == 0) && (no_pid_file == ISC_FALSE)) {
/*Read previous pid file. */
@@ -270,7 +224,7 @@ index eecc89b..afef390 100644
status = read(i, pbuf, (sizeof pbuf) - 1);
close(i);
if (status > 0) {
@@ -758,7 +758,7 @@ main(int argc, char **argv) {
@@ -878,7 +878,7 @@ main(int argc, char **argv) {
* appropriate.
*/
if (no_pid_file == ISC_FALSE) {
@@ -279,11 +233,9 @@ index eecc89b..afef390 100644
if (i >= 0) {
sprintf(pbuf, "%d\n", (int) getpid());
IGNORE_RET(write(i, pbuf, strlen(pbuf)));
diff --git a/server/ldap.c b/server/ldap.c
index 2893b82..9530d9d 100644
--- a/server/ldap.c
+++ b/server/ldap.c
@@ -1442,7 +1442,7 @@ ldap_start (void)
--- server/ldap.c.orig
+++ server/ldap.c
@@ -1446,7 +1446,7 @@ ldap_start (void)
if (ldap_debug_file != NULL && ldap_debug_fd == -1)
{
@@ -292,6 +244,3 @@ index 2893b82..9530d9d 100644
S_IRUSR | S_IWUSR)) < 0)
log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file,
strerror (errno));
--
2.1.4