]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add a REQUIRE to catch the NULL pointer dereference that triggered CVE-2017-3135
authorMark Andrews <marka@isc.org>
Tue, 31 Jan 2017 00:20:03 +0000 (11:20 +1100)
committerMark Andrews <marka@isc.org>
Tue, 31 Jan 2017 00:20:03 +0000 (11:20 +1100)
lib/dns/rdataset.c

index 8bfa645e18790f845af8456e46eb7260517d878b..704303962f0d0d8780b4c437f758003ce413d9fb 100644 (file)
@@ -334,6 +334,7 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
         */
 
        REQUIRE(DNS_RDATASET_VALID(rdataset));
+       REQUIRE(rdataset->methods != NULL);
        REQUIRE(countp != NULL);
        REQUIRE((order == NULL) == (order_arg == NULL));
        REQUIRE(cctx != NULL && cctx->mctx != NULL);