From: Mark Andrews Date: Thu, 13 Aug 2020 03:33:32 +0000 (+1000) Subject: WKS: reject records with zero octets at the end of the bitmap X-Git-Tag: v9.17.5~50^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d446142d89af49cdda65eb98054ae4cae69a0f8;p=thirdparty%2Fbind9.git WKS: reject records with zero octets at the end of the bitmap --- diff --git a/lib/dns/rdata/in_1/wks_11.c b/lib/dns/rdata/in_1/wks_11.c index 26eda5d7f60..7be55ada7bb 100644 --- a/lib/dns/rdata/in_1/wks_11.c +++ b/lib/dns/rdata/in_1/wks_11.c @@ -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); }