]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add dns_rdata_fromtext() fuzzer
authorPetr Špaček <pspacek@isc.org>
Thu, 18 Feb 2021 20:29:33 +0000 (21:29 +0100)
committerPetr Špaček <pspacek@isc.org>
Thu, 24 Feb 2022 10:12:06 +0000 (11:12 +0100)
... along with dns_rdataclass_fromtext and dns_rdatatype_fromtext

Most of the test binary is modified named-rrchecker. Main differences:
- reads single RR and exists
- does not refuse meta classes and rr types
We actually do have some fromtext code for meta-things so erroring out
in named-rrchecker would prevent us from testing this code.

Corpus has examples of all currently supported RR types. I did not do
any minimization.

In future use command

    diff -U0 \
<(sed -n -e 's/^.*fromtext_\(.*\)(.*$/\1/p' lib/dns/code.h | \
sort) \
<(ls fuzz/dns_rdata_fromtext.in/)

to check for missing RR types.

91 files changed:
fuzz/.gitignore
fuzz/Makefile.am
fuzz/dns_name_fromtext_target.c
fuzz/dns_rdata_fromtext.c [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/afsdb [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/amtrelay [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/any_tsig [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/avc [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/caa [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/cdnskey [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/cds [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/cert [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/ch_a [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/class1234_type65533 [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/cname [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/csync [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/dlv [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/dname [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/dnskey [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/doa [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/ds [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/eui48 [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/eui64 [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/gid [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/gpos [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/hinfo [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/hip [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/hs_a [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_a [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_a6 [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_aaaa [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_apl [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_atma [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_dhcid [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_eid [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_kx [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_nimloc [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_nsap [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_nsap_ptr [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_px [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_srv [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/in_wks [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/ipseckey [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/isdn [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/key [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/keydata [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/l32 [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/l64 [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/loc [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/lp [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/mb [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/md [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/mf [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/mg [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/minfo [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/mr [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/mx [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/naptr [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/nid [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/ninfo [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/ns [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/nsec [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/nsec3 [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/nsec3param [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/null [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/nxt [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/openpgpkey [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/opt [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/ptr [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/rkey [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/rp [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/rrsig [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/rt [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/sig [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/sink [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/smimea [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/soa [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/spf [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/sshfp [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/ta [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/talink [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/tkey [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/tlsa [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/txt [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/uid [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/uinfo [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/unspec [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/uri [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/x25 [new file with mode: 0644]
fuzz/dns_rdata_fromtext.in/zonemd [new file with mode: 0644]
fuzz/dns_rdata_fromwire_text.c

index 78c8720ac49334a1359a405e966dd7016d81a30f..2f9818c6ecd06e5949cf51d799a8387e31d6447c 100644 (file)
@@ -3,6 +3,7 @@
 /dns_master_load
 /dns_message_parse
 /dns_name_fromtext_target
+/dns_rdata_fromtext
 /dns_rdata_fromwire_text
 /isc_lex_getmastertoken
 /isc_lex_gettoken
index 1088f2d7d7a42afd4aefd6c56c7632f7a772d614..d82f8c359b31494cd21613e92671086aad66b6ae 100644 (file)
@@ -22,6 +22,7 @@ check_PROGRAMS =                      \
        dns_master_load                 \
        dns_message_parse               \
        dns_name_fromtext_target        \
+       dns_rdata_fromtext              \
        dns_rdata_fromwire_text         \
        isc_lex_getmastertoken          \
        isc_lex_gettoken
@@ -30,6 +31,7 @@ EXTRA_DIST =                          \
        dns_master_load.in              \
        dns_message_parse.in            \
        dns_name_fromtext_target.in     \
+       dns_rdata_fromtext.in           \
        dns_rdata_fromwire_text.in      \
        isc_lex_getmastertoken.in       \
        isc_lex_gettoken.in
index c4f32756eac056b7c86c12ec3f25fc319e1f868b..ba9c7ab2a21f9d5caf962b8307bca0d2bbc7d4d6 100644 (file)
 
 bool debug = false;
 
-static isc_mem_t *mctx = NULL;
-
 int
 LLVMFuzzerInitialize(int *argc __attribute__((unused)),
                     char ***argv __attribute__((unused))) {
-       isc_mem_create(&mctx);
-       RUNTIME_CHECK(dst_lib_init(mctx, NULL) == ISC_R_SUCCESS);
        return (0);
 }
 
@@ -40,10 +36,6 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
        isc_result_t result;
        dns_fixedname_t origin;
 
-       if (size < 5) {
-               return (0);
-       }
-
        dns_fixedname_init(&origin);
 
        isc_buffer_constinit(&buf, data, size);
@@ -52,6 +44,9 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 
        result = dns_name_fromtext(dns_fixedname_name(&origin), &buf,
                                   dns_rootname, 0, NULL);
-       UNUSED(result);
+       if (debug) {
+               fprintf(stderr, "dns_name_fromtext: %s\n",
+                       isc_result_totext(result));
+       }
        return (0);
 }
diff --git a/fuzz/dns_rdata_fromtext.c b/fuzz/dns_rdata_fromtext.c
new file mode 100644 (file)
index 0000000..b52a18f
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+#include <stdbool.h>
+#include <stdlib.h>
+
+#include <isc/attributes.h>
+#include <isc/buffer.h>
+#include <isc/commandline.h>
+#include <isc/lex.h>
+#include <isc/mem.h>
+#include <isc/print.h>
+#include <isc/string.h>
+#include <isc/util.h>
+
+#include <dns/fixedname.h>
+#include <dns/name.h>
+#include <dns/rdata.h>
+#include <dns/rdataclass.h>
+#include <dns/rdatatype.h>
+#include <dns/result.h>
+
+#include "fuzz.h"
+
+bool debug = false;
+
+int
+LLVMFuzzerInitialize(int *argc, char ***argv) {
+       UNUSED(argc);
+       UNUSED(argv);
+       return (0);
+}
+
+/* following code was copied from named-rrchecker */
+isc_lexspecials_t specials = { ['('] = 1, [')'] = 1, ['"'] = 1 };
+
+int
+LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+       isc_mem_t *mctx = NULL;
+       isc_mem_create(&mctx);
+
+       isc_lex_t *lex = NULL;
+       isc_token_t token;
+
+       isc_result_t result;
+       unsigned int options = 0;
+       dns_rdatatype_t rdtype;
+       dns_rdataclass_t rdclass;
+
+       char wiredata[64 * 1024];
+       isc_buffer_t wirebuf;
+       isc_buffer_init(&wirebuf, wiredata, sizeof(wiredata));
+
+       dns_rdata_t rdata = DNS_RDATA_INIT;
+       dns_name_t *name = NULL;
+
+       isc_buffer_t inbuf;
+       isc_buffer_constinit(&inbuf, data, size);
+       isc_buffer_add(&inbuf, size);
+       isc_buffer_setactive(&inbuf, size);
+
+       RUNTIME_CHECK(isc_lex_create(mctx, 256, &lex) == ISC_R_SUCCESS);
+
+       /*
+        * Set up to lex DNS master file.
+        */
+       isc_lex_setspecials(lex, specials);
+       options = ISC_LEXOPT_EOL;
+       isc_lex_setcomments(lex, ISC_LEXCOMMENT_DNSMASTERFILE);
+
+       RUNTIME_CHECK(isc_lex_openbuffer(lex, &inbuf) == ISC_R_SUCCESS);
+
+       result = isc_lex_gettoken(lex, options | ISC_LEXOPT_NUMBER, &token);
+       if (result != ISC_R_SUCCESS) {
+               goto cleanup;
+       }
+       if (token.type == isc_tokentype_eof) {
+               goto cleanup;
+       }
+       if (token.type == isc_tokentype_eol) {
+               goto cleanup;
+       }
+       /*
+        * Get class.
+        */
+       if (token.type == isc_tokentype_number) {
+               if (token.value.as_ulong > 0xffff) {
+                       goto cleanup;
+               }
+               rdclass = (dns_rdataclass_t)token.value.as_ulong;
+       } else if (token.type == isc_tokentype_string) {
+               result = dns_rdataclass_fromtext(&rdclass,
+                                                &token.value.as_textregion);
+               if (result != ISC_R_SUCCESS) {
+                       goto cleanup;
+               }
+       } else {
+               goto cleanup;
+       }
+       result = isc_lex_gettoken(lex, options | ISC_LEXOPT_NUMBER, &token);
+       if (result != ISC_R_SUCCESS) {
+               goto cleanup;
+       }
+       if (token.type == isc_tokentype_eol) {
+               goto cleanup;
+       }
+       if (token.type == isc_tokentype_eof) {
+               goto cleanup;
+       }
+
+       /*
+        * Get type.
+        */
+       if (token.type == isc_tokentype_number) {
+               if (token.value.as_ulong > 0xffff) {
+                       goto cleanup;
+               }
+               rdtype = (dns_rdatatype_t)token.value.as_ulong;
+       } else if (token.type == isc_tokentype_string) {
+               result = dns_rdatatype_fromtext(&rdtype,
+                                               &token.value.as_textregion);
+               if (result != ISC_R_SUCCESS) {
+                       goto cleanup;
+               }
+       } else {
+               goto cleanup;
+       }
+
+       result = dns_rdata_fromtext(&rdata, rdclass, rdtype, lex, name, 0, mctx,
+                                   &wirebuf, NULL);
+       if (debug) {
+               fprintf(stderr, "dns_rdata_fromtext: %s\n",
+                       isc_result_totext(result));
+       }
+
+cleanup:
+       isc_lex_close(lex);
+       isc_lex_destroy(&lex);
+       isc_mem_destroy(&mctx);
+       return (0);
+}
diff --git a/fuzz/dns_rdata_fromtext.in/afsdb b/fuzz/dns_rdata_fromtext.in/afsdb
new file mode 100644 (file)
index 0000000..8fec03d
--- /dev/null
@@ -0,0 +1 @@
+IN AFSDB       0 hostname
diff --git a/fuzz/dns_rdata_fromtext.in/amtrelay b/fuzz/dns_rdata_fromtext.in/amtrelay
new file mode 100644 (file)
index 0000000..d43121d
--- /dev/null
@@ -0,0 +1 @@
+IN AMTRELAY 0 0 3 example.net.
diff --git a/fuzz/dns_rdata_fromtext.in/any_tsig b/fuzz/dns_rdata_fromtext.in/any_tsig
new file mode 100644 (file)
index 0000000..bcf7fae
--- /dev/null
@@ -0,0 +1 @@
+ANY TSIG SAMPLE-ALG.EXAMPLE. 853804800 300 4 MTIzNA== 666 0 2 MDA=
diff --git a/fuzz/dns_rdata_fromtext.in/avc b/fuzz/dns_rdata_fromtext.in/avc
new file mode 100644 (file)
index 0000000..362efca
--- /dev/null
@@ -0,0 +1 @@
+IN AVC foo:bar
diff --git a/fuzz/dns_rdata_fromtext.in/caa b/fuzz/dns_rdata_fromtext.in/caa
new file mode 100644 (file)
index 0000000..fa09a60
--- /dev/null
@@ -0,0 +1 @@
+IN CAA 128 tbs "Unknown"
diff --git a/fuzz/dns_rdata_fromtext.in/cdnskey b/fuzz/dns_rdata_fromtext.in/cdnskey
new file mode 100644 (file)
index 0000000..0f9fac7
--- /dev/null
@@ -0,0 +1 @@
+IN CDNSKEY     512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV        sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg       a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
diff --git a/fuzz/dns_rdata_fromtext.in/cds b/fuzz/dns_rdata_fromtext.in/cds
new file mode 100644 (file)
index 0000000..88d6121
--- /dev/null
@@ -0,0 +1 @@
+IN CDS 30795 1 1 (             310D27F4D82C1FC2400704EA9939FE6E1CEA            A3B9 )
diff --git a/fuzz/dns_rdata_fromtext.in/cert b/fuzz/dns_rdata_fromtext.in/cert
new file mode 100644 (file)
index 0000000..669ff44
--- /dev/null
@@ -0,0 +1 @@
+IN CERT        65534 65535 254 (       MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I     kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t     VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
diff --git a/fuzz/dns_rdata_fromtext.in/ch_a b/fuzz/dns_rdata_fromtext.in/ch_a
new file mode 100644 (file)
index 0000000..bbadbf3
--- /dev/null
@@ -0,0 +1 @@
+CH A   hostname. 1234
diff --git a/fuzz/dns_rdata_fromtext.in/class1234_type65533 b/fuzz/dns_rdata_fromtext.in/class1234_type65533
new file mode 100644 (file)
index 0000000..ed30fb3
--- /dev/null
@@ -0,0 +1 @@
+CLASS1234 TYPE65533    \# 6 010203040506
diff --git a/fuzz/dns_rdata_fromtext.in/cname b/fuzz/dns_rdata_fromtext.in/cname
new file mode 100644 (file)
index 0000000..c9e00bf
--- /dev/null
@@ -0,0 +1 @@
+IN CNAME       cname-target
diff --git a/fuzz/dns_rdata_fromtext.in/csync b/fuzz/dns_rdata_fromtext.in/csync
new file mode 100644 (file)
index 0000000..8d440f8
--- /dev/null
@@ -0,0 +1 @@
+IN CSYNC       0 0 A NS AAAA
diff --git a/fuzz/dns_rdata_fromtext.in/dlv b/fuzz/dns_rdata_fromtext.in/dlv
new file mode 100644 (file)
index 0000000..9e39e6f
--- /dev/null
@@ -0,0 +1 @@
+IN DLV 30795 1 1 (             310D27F4D82C1FC2400704EA9939FE6E1CEA            A3B9 )
diff --git a/fuzz/dns_rdata_fromtext.in/dname b/fuzz/dns_rdata_fromtext.in/dname
new file mode 100644 (file)
index 0000000..2274043
--- /dev/null
@@ -0,0 +1 @@
+IN DNAME       dname-target.
diff --git a/fuzz/dns_rdata_fromtext.in/dnskey b/fuzz/dns_rdata_fromtext.in/dnskey
new file mode 100644 (file)
index 0000000..93e85c3
--- /dev/null
@@ -0,0 +1 @@
+IN DNSKEY      512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV        sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg       a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
diff --git a/fuzz/dns_rdata_fromtext.in/doa b/fuzz/dns_rdata_fromtext.in/doa
new file mode 100644 (file)
index 0000000..13b2b9b
--- /dev/null
@@ -0,0 +1 @@
+IN DOA 0 1 2 "" aHR0cHM6Ly93d3cuaXNjLm9yZy8=
diff --git a/fuzz/dns_rdata_fromtext.in/ds b/fuzz/dns_rdata_fromtext.in/ds
new file mode 100644 (file)
index 0000000..616ae14
--- /dev/null
@@ -0,0 +1 @@
+IN DS  12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390
diff --git a/fuzz/dns_rdata_fromtext.in/eui48 b/fuzz/dns_rdata_fromtext.in/eui48
new file mode 100644 (file)
index 0000000..9a506bd
--- /dev/null
@@ -0,0 +1 @@
+IN EUI48       01-23-45-67-89-ab
diff --git a/fuzz/dns_rdata_fromtext.in/eui64 b/fuzz/dns_rdata_fromtext.in/eui64
new file mode 100644 (file)
index 0000000..ce06023
--- /dev/null
@@ -0,0 +1 @@
+IN EUI64       01-23-45-67-89-ab-cd-ef
diff --git a/fuzz/dns_rdata_fromtext.in/gid b/fuzz/dns_rdata_fromtext.in/gid
new file mode 100644 (file)
index 0000000..c72ccf9
--- /dev/null
@@ -0,0 +1 @@
+IN GID \# 1 03
diff --git a/fuzz/dns_rdata_fromtext.in/gpos b/fuzz/dns_rdata_fromtext.in/gpos
new file mode 100644 (file)
index 0000000..7c4c050
--- /dev/null
@@ -0,0 +1 @@
+IN GPOS    -22.6882 116.8652 250.0
diff --git a/fuzz/dns_rdata_fromtext.in/hinfo b/fuzz/dns_rdata_fromtext.in/hinfo
new file mode 100644 (file)
index 0000000..c43de49
--- /dev/null
@@ -0,0 +1 @@
+IN HINFO       "Generic PC clone" "NetBSD-1.4"
diff --git a/fuzz/dns_rdata_fromtext.in/hip b/fuzz/dns_rdata_fromtext.in/hip
new file mode 100644 (file)
index 0000000..385a522
--- /dev/null
@@ -0,0 +1 @@
+IN HIP ( 2 200100107B1A74DF365639CC39F1D578                            AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D )
diff --git a/fuzz/dns_rdata_fromtext.in/hs_a b/fuzz/dns_rdata_fromtext.in/hs_a
new file mode 100644 (file)
index 0000000..4d9da2c
--- /dev/null
@@ -0,0 +1 @@
+HS     A       192.0.2.1
diff --git a/fuzz/dns_rdata_fromtext.in/in_a b/fuzz/dns_rdata_fromtext.in/in_a
new file mode 100644 (file)
index 0000000..f9ffd67
--- /dev/null
@@ -0,0 +1 @@
+IN A   255.255.255.255
diff --git a/fuzz/dns_rdata_fromtext.in/in_a6 b/fuzz/dns_rdata_fromtext.in/in_a6
new file mode 100644 (file)
index 0000000..8e91e2a
--- /dev/null
@@ -0,0 +1 @@
+IN A6  127 ::1 foo.
diff --git a/fuzz/dns_rdata_fromtext.in/in_aaaa b/fuzz/dns_rdata_fromtext.in/in_aaaa
new file mode 100644 (file)
index 0000000..2341d4f
--- /dev/null
@@ -0,0 +1 @@
+IN AAAA    fd92:7065:b8e:ffff::5
diff --git a/fuzz/dns_rdata_fromtext.in/in_apl b/fuzz/dns_rdata_fromtext.in/in_apl
new file mode 100644 (file)
index 0000000..dc32bd0
--- /dev/null
@@ -0,0 +1 @@
+IN APL !1:10.0.0.1/32 1:10.0.0.0/24
diff --git a/fuzz/dns_rdata_fromtext.in/in_atma b/fuzz/dns_rdata_fromtext.in/in_atma
new file mode 100644 (file)
index 0000000..1febbf4
--- /dev/null
@@ -0,0 +1 @@
+IN ATMA        +61.2.0000.0000
diff --git a/fuzz/dns_rdata_fromtext.in/in_dhcid b/fuzz/dns_rdata_fromtext.in/in_dhcid
new file mode 100644 (file)
index 0000000..0732152
--- /dev/null
@@ -0,0 +1 @@
+IN DHCID       ( AAABxLmlskllE0MVjd57zHcWmEH3pCQ6V       ytcKD//7es/deY= )
diff --git a/fuzz/dns_rdata_fromtext.in/in_eid b/fuzz/dns_rdata_fromtext.in/in_eid
new file mode 100644 (file)
index 0000000..e18f225
--- /dev/null
@@ -0,0 +1 @@
+IN EID 12 89 AB
diff --git a/fuzz/dns_rdata_fromtext.in/in_kx b/fuzz/dns_rdata_fromtext.in/in_kx
new file mode 100644 (file)
index 0000000..48c0e15
--- /dev/null
@@ -0,0 +1 @@
+IN KX  10 kdc
diff --git a/fuzz/dns_rdata_fromtext.in/in_nimloc b/fuzz/dns_rdata_fromtext.in/in_nimloc
new file mode 100644 (file)
index 0000000..41c6f7b
--- /dev/null
@@ -0,0 +1 @@
+IN NIMLOC      12 89 AB
diff --git a/fuzz/dns_rdata_fromtext.in/in_nsap b/fuzz/dns_rdata_fromtext.in/in_nsap
new file mode 100644 (file)
index 0000000..8a7a927
--- /dev/null
@@ -0,0 +1 @@
+IN NSAP  0x47.0005.80.005a00.0000.0001.e133.ffffff000164.00
diff --git a/fuzz/dns_rdata_fromtext.in/in_nsap_ptr b/fuzz/dns_rdata_fromtext.in/in_nsap_ptr
new file mode 100644 (file)
index 0000000..dc683c7
--- /dev/null
@@ -0,0 +1 @@
+IN NSAP-PTR foo.
diff --git a/fuzz/dns_rdata_fromtext.in/in_px b/fuzz/dns_rdata_fromtext.in/in_px
new file mode 100644 (file)
index 0000000..1e6c98b
--- /dev/null
@@ -0,0 +1 @@
+IN PX  65535 foo. bar.
diff --git a/fuzz/dns_rdata_fromtext.in/in_srv b/fuzz/dns_rdata_fromtext.in/in_srv
new file mode 100644 (file)
index 0000000..ed3f929
--- /dev/null
@@ -0,0 +1 @@
+IN SRV 65535 65535 65535  old-slow-box
diff --git a/fuzz/dns_rdata_fromtext.in/in_wks b/fuzz/dns_rdata_fromtext.in/in_wks
new file mode 100644 (file)
index 0000000..a9c9658
--- /dev/null
@@ -0,0 +1 @@
+IN WKS 10.0.0.1 tcp telnet ftp 0 1 2
diff --git a/fuzz/dns_rdata_fromtext.in/ipseckey b/fuzz/dns_rdata_fromtext.in/ipseckey
new file mode 100644 (file)
index 0000000..14dbb7f
--- /dev/null
@@ -0,0 +1 @@
+IN IPSECKEY    ( 10 3 2                  mygateway.example.com.                  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )
diff --git a/fuzz/dns_rdata_fromtext.in/isdn b/fuzz/dns_rdata_fromtext.in/isdn
new file mode 100644 (file)
index 0000000..c3cc968
--- /dev/null
@@ -0,0 +1 @@
+IN ISDN        "isdn-address" "subaddress"
diff --git a/fuzz/dns_rdata_fromtext.in/key b/fuzz/dns_rdata_fromtext.in/key
new file mode 100644 (file)
index 0000000..91323a8
--- /dev/null
@@ -0,0 +1 @@
+IN KEY 512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV        sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg       a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
diff --git a/fuzz/dns_rdata_fromtext.in/keydata b/fuzz/dns_rdata_fromtext.in/keydata
new file mode 100644 (file)
index 0000000..b67e3aa
--- /dev/null
@@ -0,0 +1 @@
+IN KEYDATA 20210101000000 20380101000000 20380101000000 KSK DNSSEC ED448 ZXh0cmE=
diff --git a/fuzz/dns_rdata_fromtext.in/l32 b/fuzz/dns_rdata_fromtext.in/l32
new file mode 100644 (file)
index 0000000..c315e9c
--- /dev/null
@@ -0,0 +1 @@
+IN L32 10 1.2.3.4
diff --git a/fuzz/dns_rdata_fromtext.in/l64 b/fuzz/dns_rdata_fromtext.in/l64
new file mode 100644 (file)
index 0000000..673f0a2
--- /dev/null
@@ -0,0 +1 @@
+IN L64 10 0014:4fff:ff20:ee64
diff --git a/fuzz/dns_rdata_fromtext.in/loc b/fuzz/dns_rdata_fromtext.in/loc
new file mode 100644 (file)
index 0000000..413a5a8
--- /dev/null
@@ -0,0 +1 @@
+IN LOC         60 09 00.000 N 24 39 00.000 E 10.00m 20.00m (     2000.00m 20.00m )
diff --git a/fuzz/dns_rdata_fromtext.in/lp b/fuzz/dns_rdata_fromtext.in/lp
new file mode 100644 (file)
index 0000000..1b21752
--- /dev/null
@@ -0,0 +1 @@
+IN LP  10 example.net.
diff --git a/fuzz/dns_rdata_fromtext.in/mb b/fuzz/dns_rdata_fromtext.in/mb
new file mode 100644 (file)
index 0000000..adc9470
--- /dev/null
@@ -0,0 +1 @@
+IN MB madname.
diff --git a/fuzz/dns_rdata_fromtext.in/md b/fuzz/dns_rdata_fromtext.in/md
new file mode 100644 (file)
index 0000000..f6996e0
--- /dev/null
@@ -0,0 +1 @@
+IN MD  madname
diff --git a/fuzz/dns_rdata_fromtext.in/mf b/fuzz/dns_rdata_fromtext.in/mf
new file mode 100644 (file)
index 0000000..3dc3bc2
--- /dev/null
@@ -0,0 +1 @@
+IN MF  madname
diff --git a/fuzz/dns_rdata_fromtext.in/mg b/fuzz/dns_rdata_fromtext.in/mg
new file mode 100644 (file)
index 0000000..83ff2bc
--- /dev/null
@@ -0,0 +1 @@
+IN MG  mgmname
diff --git a/fuzz/dns_rdata_fromtext.in/minfo b/fuzz/dns_rdata_fromtext.in/minfo
new file mode 100644 (file)
index 0000000..e64d925
--- /dev/null
@@ -0,0 +1 @@
+IN MINFO       rmailbx emailbx
diff --git a/fuzz/dns_rdata_fromtext.in/mr b/fuzz/dns_rdata_fromtext.in/mr
new file mode 100644 (file)
index 0000000..ca058b8
--- /dev/null
@@ -0,0 +1 @@
+IN MR  mrname
diff --git a/fuzz/dns_rdata_fromtext.in/mx b/fuzz/dns_rdata_fromtext.in/mx
new file mode 100644 (file)
index 0000000..3d1dcdb
--- /dev/null
@@ -0,0 +1 @@
+IN MX  10 mail
diff --git a/fuzz/dns_rdata_fromtext.in/naptr b/fuzz/dns_rdata_fromtext.in/naptr
new file mode 100644 (file)
index 0000000..2489600
--- /dev/null
@@ -0,0 +1 @@
+IN NAPTR   65535 65535 "blurgh" "blorf" "blllbb" foo.
diff --git a/fuzz/dns_rdata_fromtext.in/nid b/fuzz/dns_rdata_fromtext.in/nid
new file mode 100644 (file)
index 0000000..f011125
--- /dev/null
@@ -0,0 +1 @@
+IN NID 10 0014:4fff:ff20:ee64
diff --git a/fuzz/dns_rdata_fromtext.in/ninfo b/fuzz/dns_rdata_fromtext.in/ninfo
new file mode 100644 (file)
index 0000000..4d58d28
--- /dev/null
@@ -0,0 +1 @@
+IN NINFO       "foo\032bar"
diff --git a/fuzz/dns_rdata_fromtext.in/ns b/fuzz/dns_rdata_fromtext.in/ns
new file mode 100644 (file)
index 0000000..da0bca2
--- /dev/null
@@ -0,0 +1 @@
+IN NS  ns43
diff --git a/fuzz/dns_rdata_fromtext.in/nsec b/fuzz/dns_rdata_fromtext.in/nsec
new file mode 100644 (file)
index 0000000..8cbd1e8
--- /dev/null
@@ -0,0 +1 @@
+IN NSEC        a.secure.nil. ( NS SOA MX RRSIG DNSKEY LOC NSEC )
diff --git a/fuzz/dns_rdata_fromtext.in/nsec3 b/fuzz/dns_rdata_fromtext.in/nsec3
new file mode 100644 (file)
index 0000000..bc615a1
--- /dev/null
@@ -0,0 +1 @@
+IN NSEC3 1 0 10 D2CF0294C020CE6C 8FPNS2UCT7FBS643THP2B77PEQ77K6IU  A NS SOA MX AAAA RRSIG DNSKEY NSEC3PARAM
diff --git a/fuzz/dns_rdata_fromtext.in/nsec3param b/fuzz/dns_rdata_fromtext.in/nsec3param
new file mode 100644 (file)
index 0000000..414f44d
--- /dev/null
@@ -0,0 +1 @@
+IN NSEC3PARAM 1 0 1 868BCF7ED4108929
diff --git a/fuzz/dns_rdata_fromtext.in/null b/fuzz/dns_rdata_fromtext.in/null
new file mode 100644 (file)
index 0000000..bebe069
--- /dev/null
@@ -0,0 +1 @@
+IN NULL
diff --git a/fuzz/dns_rdata_fromtext.in/nxt b/fuzz/dns_rdata_fromtext.in/nxt
new file mode 100644 (file)
index 0000000..9f4d243
--- /dev/null
@@ -0,0 +1 @@
+IN NXT a.secure.nil. ( NS SOA MX RRSIG KEY LOC NXT )
diff --git a/fuzz/dns_rdata_fromtext.in/openpgpkey b/fuzz/dns_rdata_fromtext.in/openpgpkey
new file mode 100644 (file)
index 0000000..4c99b65
--- /dev/null
@@ -0,0 +1 @@
+IN OPENPGPKEY  ( AQMFD5raczCJHViKtLYhWGz8hMY   9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV        sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg       a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
diff --git a/fuzz/dns_rdata_fromtext.in/opt b/fuzz/dns_rdata_fromtext.in/opt
new file mode 100644 (file)
index 0000000..b391304
--- /dev/null
@@ -0,0 +1 @@
+ANY OPT unsupported
diff --git a/fuzz/dns_rdata_fromtext.in/ptr b/fuzz/dns_rdata_fromtext.in/ptr
new file mode 100644 (file)
index 0000000..040dc3b
--- /dev/null
@@ -0,0 +1 @@
+IN PTR @
diff --git a/fuzz/dns_rdata_fromtext.in/rkey b/fuzz/dns_rdata_fromtext.in/rkey
new file mode 100644 (file)
index 0000000..fc59f3a
--- /dev/null
@@ -0,0 +1 @@
+IN RKEY        0 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY   9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV        sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg       a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
diff --git a/fuzz/dns_rdata_fromtext.in/rp b/fuzz/dns_rdata_fromtext.in/rp
new file mode 100644 (file)
index 0000000..04e65c2
--- /dev/null
@@ -0,0 +1 @@
+IN RP  mbox-dname txt-dname
diff --git a/fuzz/dns_rdata_fromtext.in/rrsig b/fuzz/dns_rdata_fromtext.in/rrsig
new file mode 100644 (file)
index 0000000..53819d0
--- /dev/null
@@ -0,0 +1 @@
+IN RRSIG       NSEC 1 3 ( 3600 20000102030405  19961211100908 2143 foo.nil.    MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I     kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t     VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
diff --git a/fuzz/dns_rdata_fromtext.in/rt b/fuzz/dns_rdata_fromtext.in/rt
new file mode 100644 (file)
index 0000000..3268638
--- /dev/null
@@ -0,0 +1 @@
+IN RT  0 intermediate-host
diff --git a/fuzz/dns_rdata_fromtext.in/sig b/fuzz/dns_rdata_fromtext.in/sig
new file mode 100644 (file)
index 0000000..f92bd70
--- /dev/null
@@ -0,0 +1 @@
+IN SIG NXT 1 3 ( 3600 20000102030405   19961211100908 2143 foo.nil.    MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I     kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t     VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
diff --git a/fuzz/dns_rdata_fromtext.in/sink b/fuzz/dns_rdata_fromtext.in/sink
new file mode 100644 (file)
index 0000000..a85cc45
--- /dev/null
@@ -0,0 +1 @@
+IN SINK        8 0 2 l4ik
diff --git a/fuzz/dns_rdata_fromtext.in/smimea b/fuzz/dns_rdata_fromtext.in/smimea
new file mode 100644 (file)
index 0000000..95107a1
--- /dev/null
@@ -0,0 +1 @@
+IN SMIMEA      ( 1 1 2 92003ba34942dc74152e2f2c408d29ec        a5a520e7f2e06bb944f4dca346baf63c        1b177615d466f6c4b71c216a50292bd5        8c9ebdd2f74e38fe51ffd48c43326cbc )
diff --git a/fuzz/dns_rdata_fromtext.in/soa b/fuzz/dns_rdata_fromtext.in/soa
new file mode 100644 (file)
index 0000000..d3a677c
--- /dev/null
@@ -0,0 +1 @@
+IN SOA a.test. hostmaster.null. 1613723740 900 300 604800 900
diff --git a/fuzz/dns_rdata_fromtext.in/spf b/fuzz/dns_rdata_fromtext.in/spf
new file mode 100644 (file)
index 0000000..a15ca16
--- /dev/null
@@ -0,0 +1 @@
+IN SPF "v=spf1" " -all"
diff --git a/fuzz/dns_rdata_fromtext.in/sshfp b/fuzz/dns_rdata_fromtext.in/sshfp
new file mode 100644 (file)
index 0000000..bc15aa4
--- /dev/null
@@ -0,0 +1 @@
+IN SSHFP       4 2 C76D8329954DA2835751E371544E963EFDA099080D6C58DD2BFD9A31 6E162C83
diff --git a/fuzz/dns_rdata_fromtext.in/ta b/fuzz/dns_rdata_fromtext.in/ta
new file mode 100644 (file)
index 0000000..429d426
--- /dev/null
@@ -0,0 +1 @@
+IN TA  30795 1 1 (             310D27F4D82C1FC2400704EA9939FE6E1CEA            A3B9 )
diff --git a/fuzz/dns_rdata_fromtext.in/talink b/fuzz/dns_rdata_fromtext.in/talink
new file mode 100644 (file)
index 0000000..1788a62
--- /dev/null
@@ -0,0 +1 @@
+IN TALINK      . talink1
diff --git a/fuzz/dns_rdata_fromtext.in/tkey b/fuzz/dns_rdata_fromtext.in/tkey
new file mode 100644 (file)
index 0000000..eb38e20
--- /dev/null
@@ -0,0 +1 @@
+IN TKEY algo.test. 0 0 0 0 2 MjI= 1 MQ==
diff --git a/fuzz/dns_rdata_fromtext.in/tlsa b/fuzz/dns_rdata_fromtext.in/tlsa
new file mode 100644 (file)
index 0000000..0b65f21
--- /dev/null
@@ -0,0 +1 @@
+IN TLSA ( 0 0 1 d2abde240d7cd3ee6b4b28c54df034b9  7983a1d16e8a410e4561cb106618e971 )
diff --git a/fuzz/dns_rdata_fromtext.in/txt b/fuzz/dns_rdata_fromtext.in/txt
new file mode 100644 (file)
index 0000000..a20b128
--- /dev/null
@@ -0,0 +1 @@
+IN TXT "\"foo\010bar\""
diff --git a/fuzz/dns_rdata_fromtext.in/uid b/fuzz/dns_rdata_fromtext.in/uid
new file mode 100644 (file)
index 0000000..7f662f1
--- /dev/null
@@ -0,0 +1 @@
+IN UID \# 1 02
diff --git a/fuzz/dns_rdata_fromtext.in/uinfo b/fuzz/dns_rdata_fromtext.in/uinfo
new file mode 100644 (file)
index 0000000..ec979be
--- /dev/null
@@ -0,0 +1 @@
+IN UINFO       \# 1 01
diff --git a/fuzz/dns_rdata_fromtext.in/unspec b/fuzz/dns_rdata_fromtext.in/unspec
new file mode 100644 (file)
index 0000000..579eea6
--- /dev/null
@@ -0,0 +1 @@
+IN UNSPEC      \# 1 04
diff --git a/fuzz/dns_rdata_fromtext.in/uri b/fuzz/dns_rdata_fromtext.in/uri
new file mode 100644 (file)
index 0000000..9497109
--- /dev/null
@@ -0,0 +1 @@
+IN URI 10 20 "https://www.isc.org/"
diff --git a/fuzz/dns_rdata_fromtext.in/x25 b/fuzz/dns_rdata_fromtext.in/x25
new file mode 100644 (file)
index 0000000..1a60ed7
--- /dev/null
@@ -0,0 +1 @@
+IN X25 "123456789"
diff --git a/fuzz/dns_rdata_fromtext.in/zonemd b/fuzz/dns_rdata_fromtext.in/zonemd
new file mode 100644 (file)
index 0000000..539bb5e
--- /dev/null
@@ -0,0 +1 @@
+IN ZONEMD      2019020700 1 0 (        C220B8A6ED5728A971902F7E3D4FD93A        DEEA88B0453C2E8E8C863D465AB06CF3        4EB95B266398C98B59124FA239CB7EEB        )
index f3b8d50aa0de814e59d5aea63337ce4c96cd7b57..f05ddd4be5ff4e5af9168ddfe96d7c4345d93766 100644 (file)
@@ -47,7 +47,6 @@ LLVMFuzzerInitialize(int *argc __attribute__((unused)),
        isc_lexspecials_t specials;
 
        isc_mem_create(&mctx);
-       RUNTIME_CHECK(dst_lib_init(mctx, NULL) == ISC_R_SUCCESS);
        CHECK(isc_lex_create(mctx, 64, &lex));
 
        memset(specials, 0, sizeof(specials));