]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
WKS: reject records with zero octets at the end of the bitmap
authorMark Andrews <marka@isc.org>
Thu, 13 Aug 2020 03:33:32 +0000 (13:33 +1000)
committerMark Andrews <marka@isc.org>
Thu, 13 Aug 2020 13:06:55 +0000 (23:06 +1000)
lib/dns/rdata/in_1/wks_11.c

index 26eda5d7f60711b9a35ca70a0f267fb8a441cefe..7be55ada7bbebb3001e19ede936b0a05f24d79d7 100644 (file)
@@ -268,6 +268,9 @@ fromwire_in_wks(ARGS_FROMWIRE) {
        if (sr.length > 8 * 1024 + 5) {
                return (DNS_R_EXTRADATA);
        }
+       if (sr.length > 5 && sr.base[sr.length - 1] == 0) {
+               return (DNS_R_FORMERR);
+       }
        if (tr.length < sr.length) {
                return (ISC_R_NOSPACE);
        }