Blame SOURCES/ntp-4.2.6p5-cve-2017-6463.patch

6e16f6
2017-02-12 11:08:16+01:00, perlinger@ntp.org
6e16f6
  [Sec 3387] NTP-01-012: Authenticated DoS via Malicious Config Option
6e16f6
6e16f6
diff -up ntp-4.2.6p5/ntpd/ntp_config.c.cve-2017-6463 ntp-4.2.6p5/ntpd/ntp_config.c
6e16f6
--- ntp-4.2.6p5/ntpd/ntp_config.c.cve-2017-6463	2017-03-22 14:28:51.342870650 +0100
6e16f6
+++ ntp-4.2.6p5/ntpd/ntp_config.c	2017-03-22 15:20:44.970380429 +0100
6e16f6
@@ -1264,7 +1264,8 @@ destroy_address_node(
6e16f6
 	struct address_node *my_node
6e16f6
 	)
6e16f6
 {
6e16f6
-	NTP_REQUIRE(NULL != my_node);
6e16f6
+	if (NULL == my_node)
6e16f6
+		return;
6e16f6
 	NTP_REQUIRE(NULL != my_node->address);
6e16f6
 
6e16f6
 	free(my_node->address);
6e16f6
@@ -3563,10 +3564,10 @@ config_unpeers(
6e16f6
 	     curr_unpeer = next_node(curr_unpeer)) {
6e16f6
 
6e16f6
 		/*
6e16f6
-		 * Either AssocID will be zero, and we unpeer by name/
6e16f6
-		 * address addr, or it is nonzero and addr NULL.
6e16f6
+		 * If we have no address attached, assume we have to
6e16f6
+		 * unpeer by AssocID.
6e16f6
 		 */
6e16f6
-		if (curr_unpeer->assocID) {
6e16f6
+		if (!curr_unpeer->addr) {
6e16f6
 			peer = findpeerbyassoc((u_int)curr_unpeer->assocID);
6e16f6
 			if (peer != NULL) {
6e16f6
 				peer_clear(peer, "GONE");