]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check that sig0 name is the root.
authorMark Andrews <marka@isc.org>
Tue, 29 Sep 2020 03:25:44 +0000 (13:25 +1000)
committerMark Andrews <marka@isc.org>
Wed, 30 Sep 2020 13:24:29 +0000 (13:24 +0000)
lib/dns/message.c

index e57dfd9c02e516301f3e5807c5918e05ae51008e..602edc7a1063bad35a4329f07d09e79f54713667 100644 (file)
@@ -1456,7 +1456,9 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
                        covers = dns_rdata_covers(rdata);
                        if (covers == 0) {
                                if (sectionid != DNS_SECTION_ADDITIONAL ||
-                                   count != msg->counts[sectionid] - 1) {
+                                   count != msg->counts[sectionid] - 1 ||
+                                   !dns_name_equal(name, dns_rootname))
+                               {
                                        DO_ERROR(DNS_R_BADSIG0);
                                } else {
                                        skip_name_search = true;