]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_11_0_patch] remove unnecessary INSIST and prep 9.11.1-P4
authorEvan Hunt <each@isc.org>
Thu, 23 Feb 2017 23:28:52 +0000 (15:28 -0800)
committerEvan Hunt <each@isc.org>
Thu, 23 Feb 2017 23:34:50 +0000 (15:34 -0800)
4578. [security] Some chaining (CNAME or DNAME) responses to upstream
queries could trigger assertion failures.
(CVE-2017-3137) [RT #44734]

(cherry picked from commit a1365a0042db8c1cd0ee4dbd0c91ce65ae09e098)
(cherry picked from commit 559cbe04e73cf601784a371e09554c20407a6c7b)

CHANGES
README
doc/arm/notes.xml
lib/dns/api
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 9b8d7e9225d81dd0319037398b47b2b65cf17384..ed04e8543a06097aa33ace59922450576b7b480b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
        --- 9.11.0-P4 released ---
 
+4578.  [security]      Some chaining (CNAME or DNAME) responses to upstream
+                       queries could trigger assertion failures.
+                       (CVE-2017-3137) [RT #44734]
+
 4575.  [security]      DNS64 with "break-dnssec yes;" can result in an
                        assertion failure. (CVE-2017-3136) [RT #44653]
 
diff --git a/README b/README
index f12f764611fd5e98fbb0338aac9ebbaf6efe81d0..184ff02f9d56d05eecd4b47a3c4a7775a5677cd4 100644 (file)
--- a/README
+++ b/README
@@ -53,8 +53,8 @@ BIND 9
 
 BIND 9.11.0-P4
 
-       This version contains a fix for CVE-2017-3136, and updates
-       the built in trusted keys for the root zone.
+       This version contains fixes for CVE-2017-3136 and CVE-2017-3137,
+       and updates the built in trusted keys for the root zone.
 
 BIND 9.11.0-P3
 
@@ -88,9 +88,9 @@ BIND 9.11.0
          from an external database, developed by Red Hat for the FreeIPA
          project.
        - "fetchlimit" quotas are now compiled in by default.  These
-          are for the use of recursive resolvers that are are under
-          high query load for domains whose authoritative servers are
-          nonresponsive or are experiencing a denial of service attack:
+         are for the use of recursive resolvers that are are under
+         high query load for domains whose authoritative servers are
+         nonresponsive or are experiencing a denial of service attack:
          + "fetches-per-server" limits the number of simultaneous queries
            that can be sent to any single authoritative server.  The
            configured value is a starting point; it is automatically
index de74dc3eeb4382db15aa0273f7684c4e5d148623..4bf082ce9e947f1de40b98d7ee04ceb7a1c94dfe 100644 (file)
 
   <section xml:id="relnotes_security"><info><title>Security Fixes</title></info>
     <itemizedlist>
+      <listitem>
+       <para>
+         Some chaining (i.e., type CNAME or DNAME) responses to upstream
+         queries could trigger assertion failures. This flaw is disclosed
+         in CVE-2017-3137. [RT #44734]
+       </para>
+      </listitem>
       <listitem>
        <para>
          <command>dns64</command> with <command>break-dnssec yes;</command>
          can result in an assertion failure. This flaw is disclosed in
-         CVE-2017-3136.[RT #44653]
+         CVE-2017-3136. [RT #44653]
        </para>
       </listitem>
       <listitem>
index dbeb6d158793b480fa5cf5e3bd381407d4cb018f..1fd2092f0da10d7239a0869ee6f532f63e4e4136 100644 (file)
@@ -7,5 +7,5 @@
 # 9.10: 140-149
 # 9.11: 160-169
 LIBINTERFACE = 166
-LIBREVISION = 5
+LIBREVISION = 6
 LIBAGE = 0
index 80cf5a7c76f7404ff350894bccf5075a3dae8317..dc751e4f7b9bf73a17a72bed76bf6ec439b50fd4 100644 (file)
@@ -7000,15 +7000,15 @@ answer_response(fetchctx_t *fctx) {
                                        rdataset->attributes |=
                                                DNS_RDATASETATTR_CACHE;
                                        rdataset->trust = dns_trust_answer;
-                                       if (chaining == 0) {
+                                       if (external) {
                                                /*
-                                                * This data is "the" answer
-                                                * to our question only if
-                                                * we're not chaining (i.e.
-                                                * if we haven't followed
-                                                * a CNAME or DNAME).
+                                                * This data is outside of
+                                                * our query domain, and
+                                                * may not be cached.
                                                 */
-                                               INSIST(!external);
+                                               rdataset->attributes |=
+                                                   DNS_RDATASETATTR_EXTERNAL;
+                                       } else if (chaining == 0) {
                                                /*
                                                 * Don't use found_cname here
                                                 * as we have just set it
@@ -7030,14 +7030,6 @@ answer_response(fetchctx_t *fctx) {
                                                if (aa)
                                                        rdataset->trust =
                                                          dns_trust_authanswer;
-                                       } else if (external) {
-                                               /*
-                                                * This data is outside of
-                                                * our query domain, and
-                                                * may not be cached.
-                                                */
-                                               rdataset->attributes |=
-                                                   DNS_RDATASETATTR_EXTERNAL;
                                        }
 
                                        /*
@@ -7212,15 +7204,12 @@ answer_response(fetchctx_t *fctx) {
                                 * If we are not chaining or the first CNAME
                                 * is a synthesised CNAME before the DNAME.
                                 */
-                               if ((chaining == 0) ||
-                                   (chaining == 1U && synthcname))
+                               if (external) {
+                                       rdataset->attributes |=
+                                           DNS_RDATASETATTR_EXTERNAL;
+                               } else if ((chaining == 0) ||
+                                          (chaining == 1U && synthcname))
                                {
-                                       /*
-                                        * This data is "the" answer to
-                                        * our question only if we're
-                                        * not chaining.
-                                        */
-                                       INSIST(!external);
                                        if (aflag == DNS_RDATASETATTR_ANSWER) {
                                                have_answer = ISC_TRUE;
                                                found_dname = ISC_TRUE;
@@ -7237,9 +7226,6 @@ answer_response(fetchctx_t *fctx) {
                                        if (aa)
                                                rdataset->trust =
                                                  dns_trust_authanswer;
-                               } else if (external) {
-                                       rdataset->attributes |=
-                                           DNS_RDATASETATTR_EXTERNAL;
                                }
                        }