diff --git a/CHANGES b/CHANGES index 8ff0bf79e2..fbcc8321d2 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 0000000000..9a763a86a6 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 3ca1723c55..75af983e34 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));