From: Mukund Sivaraman Date: Fri, 27 Mar 2015 05:01:29 +0000 (+0530) Subject: Fix a crash while parsing malformed CAA RRs in presentation format (#39003) X-Git-Tag: v9.11.0a1~903 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f9f81abff0ea36f19474f3b7a11bf0f17c4f116c;p=thirdparty%2Fbind9.git Fix a crash while parsing malformed CAA RRs in presentation format (#39003) --- diff --git a/CHANGES b/CHANGES index 8ff0bf79e24..fbcc8321d2d 100644 --- 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 index 00000000000..9a763a86a69 Binary files /dev/null and b/bin/tests/system/checkzone/zones/bad-caa-rr.db differ diff --git a/lib/dns/rdata/generic/caa_257.c b/lib/dns/rdata/generic/caa_257.c index 3ca1723c557..75af983e344 100644 --- a/lib/dns/rdata/generic/caa_257.c +++ b/lib/dns/rdata/generic/caa_257.c @@ -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));