]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix a crash while parsing malformed CAA RRs in presentation format (#39003)
authorMukund Sivaraman <muks@isc.org>
Fri, 27 Mar 2015 05:01:29 +0000 (10:31 +0530)
committerMukund Sivaraman <muks@isc.org>
Fri, 27 Mar 2015 05:02:03 +0000 (10:32 +0530)
CHANGES
bin/tests/system/checkzone/zones/bad-caa-rr.db [new file with mode: 0644]
lib/dns/rdata/generic/caa_257.c

diff --git a/CHANGES b/CHANGES
index 8ff0bf79e2457985a1a602c872067bfc9b856cd5..fbcc8321d2d85eed21c9aa33924ea27191078b26 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+4090.  [bug]           Fix a crash while parsing malformed CAA RRs in
+                       presentation format, i.e., from text such as
+                       from master files. Thanks to John Van de
+                       Meulebrouck Brendgard for discovering and
+                       reporting this problem. [RT #39003]
+
 4089.  [bug]           Send notifies immediately for slave zones during
                        startup. [RT #38843]
 
diff --git a/bin/tests/system/checkzone/zones/bad-caa-rr.db b/bin/tests/system/checkzone/zones/bad-caa-rr.db
new file mode 100644 (file)
index 0000000..9a763a8
Binary files /dev/null and b/bin/tests/system/checkzone/zones/bad-caa-rr.db differ
index 3ca1723c557ce203e08b4dc5a21953c428ce14ba..75af983e344996ad27dfddec03bcca0d4e1cc0f4 100644 (file)
@@ -68,7 +68,7 @@ fromtext_caa(ARGS_FROMTEXT) {
                                      ISC_FALSE));
        tr = token.value.as_textregion;
        for (i = 0; i < tr.length; i++)
-               if (!alphanumeric[(unsigned int) tr.base[i]])
+               if (!alphanumeric[(unsigned char) tr.base[i]])
                        RETTOK(DNS_R_SYNTAX);
        RETERR(uint8_tobuffer(tr.length, target));
        RETERR(mem_tobuffer(target, tr.base, tr.length));