# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Fuzzer dictionary targetting DNS responses.
# Some 16-bit big-endian values. Useful in a number of fields. Includes
# A, AAAA, and CNAME IDs, low values for record counts, and multiples of
# lengths of A and AAAA data fields. Also some resulting data sizes from
# combining HTTPS service parameters below with domain names below.
"\x00\x00"
"\x00\x01"
"\x00\x02"
"\x00\x03"
"\x00\x04"
"\x00\x05"
"\x00\x08"
"\x00\x0B"
"\x00\x0C"
"\x00\x0D"
"\x00\x0E"
"\x00\x0F"
"\x00\x10"
"\x00\x11"
"\x00\x12"
"\x00\x13"
"\x00\x14"
"\x00\x15"
"\x00\x16"
"\x00\x17"
"\x00\x19"
"\x00\x1B"
"\x00\x1C"
"\x00\x1D"
"\x00\x1F"
"\x00\x20"
"\x00\x21"
"\x00\x30"
# Some encoded domain names.
"\x03foo\x00"
"\x03foo\x03com\x00"
"\x01a\x03foo\x03com\x00"
"\x03bar\x00"
# Message headers (Without message ID field).
"\x81\x80\x00\x01\x00\x01\x00\x00\x00\x00"
# Truncated message, requiring TCP fallback.
"\x83\x80\x00\x01\x00\x01\x00\x00\x00\x00"
# Varying number of answers
"\x81\x80\x00\x01\x00\x00\x00\x00\x00\x00"
"\x81\x80\x00\x01\x00\x02\x00\x00\x00\x00"
"\x81\x80\x00\x01\x00\x10\x00\x00\x00\x00"
# A, AAAA, CNAME, and HTTPS request suffixes - appear after domain name.
"\x00\x01\x00\x01"
"\x00\x1c\x00\x01"
"\x00\x05\x00\x01"
"\x00\x41\x00\x01"
# ESNI (TLS 1.3 encrypted server name indication, experimental) draft 4
# request suffix
"\xff\x9f\x00\x01"
# A, AAAA, CNAME, and HTTPS requests for foo and foo.com.
"\x03foo\x00\x00\x01\x00\x01"
"\x03foo\x00\x00\x1c\x00\x01"
"\x03foo\x00\x00\x05\x00\x01"
"\x03foo\x00\x00\x41\x00\x01"
"\x03foo\x03com\x00\x00\x01\x00\x01"
"\x03foo\x03com\x00\x00\x1c\x00\x01"
"\x03foo\x03com\x00\x00\x05\x00\x01"
"\x03foo\x03com\x00\x00\x41\x00\x01"
# ESNI draft 4 (see above) requests for foo and foo.com
"\x03foo\x00\xff\x9f\x00\x01"
"\x03foo\x03com\x00\xff\x9f\x00\x01"
# All of the answers below are missing the name field, which should appear
# first.
# A answer suffixes, two different IP and TTLs.
"\x00\x01\x00\x01\x00\x00\x00\x00\x00\x04\x01\x02\x03\x04"
"\x00\x01\x00\x01\x00\x00\x00\xFF\x00\x04\x02\x03\x04\x05"
# AAAA answer suffixes, two different IPs and TTLs.
"\x00\x1C\x00\x01\x00\x00\x00\x00\x00\x08\x01\x02\x03\x04\x05\x06\x07\x08"
"\x00\x1C\x00\x01\x00\x00\x00\xFF\x00\x08\x02\x03\x04\x05\x06\x07\x08\x09"
# CDATA answer suffixes, first two truncated as well.
"\x00\x05\x00\x01\x00\x00\x00\xFF"
"\x00\x05\x00\x01\x00\x00\x00\xFF\x00\x05"
"\x00\x05\x00\x01\x00\x00\x00\xFF\x00\x05\x03foo\x00"
"\x00\x05\x00\x01\x00\x00\x00\xFF\x00\x05\x03bar\x00"
"\x00\x05\x00\x01\x00\x00\x00\xFF\x00\x09\x03foo\x03com\x00"
# HTTPS answer suffixes (without service params)
"\x00\x41\x00\x01\x00\x00\x00\x10\x00\x07\x00\x00\x03foo\x00"
"\x00\x41\x00\x01\x00\x00\x14\x00\x00\x03\x00\x00\x00"
"\x00\x41\x00\x01\x00\x00\x00\x10\x00\x07\x00\x00\x03foo\x00"
"\x00\x41\x00\x01\x00\x00\x14\x00\x00\x03\x00\x00\x00"
# HTTPS service params
"\x00\x00\x00\x0C\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06"
"\x00\x01\x00\x08\x03foo\x03bar"
"\x00\x02\x00\x00"
"\x00\x03\x00\x02\x14\xC3"
"\x00\x04\x00\x04\x08\x08\x08\x08"
"\x00\x05\x00\x05hello"
"\x00\x06\x00\x10\x20\x01\x48\x60\x48\x60\x00\x00\x00\x00\x00\x00\x00\x00\x88\x88"
"\x00\x07\x00\x03foo"
# ESNI draft 4 (see above) answer suffix, first truncated
# (These are construted from dns_test_util's kWellFormedEsniKeys.)
"\xff\x9f\x00\x01\x00\x00\x00\xFF\xff\x03\x00\x01\x00\x33\xff\x00\x24\x00\x1d\x00\x20\xed\xed\xc8\x68\xc1\x71\xd6\x9e\xa9\xf0\xa2\xc9\xf5\xa9\xdc\xcf\xf9\xb8\xed\x15\x5c\xc4\x5a\xec\x6f\xb2\x86\x14\xb7\x71\x1b\x7c\x00\x02"
"\xff\x9f\x00\x01\x00\x00\x00\xFF\xff\x03\x00\x01\x00\x33\xff\x00\x24\x00\x1d\x00\x20\xed\xed\xc8\x68\xc1\x71\xd6\x9e\xa9\xf0\xa2\xc9\xf5\xa9\xdc\xcf\xf9\xb8\xed\x15\x5c\xc4\x5a\xec\x6f\xb2\x86\x14\xb7\x71\x1b\x7c\x00\x02\x13\x01\x01\x04\x00\x00"
# OptRecordRdata containing an EDE opt.
"\x00\x0f\x00\x0b\x00\x0eWORCESTER"
"\x00\x0f\x00\x09\x00\x15CONCORD"
# OptRecordRdata containing an EDE opt with a non-existent opt code.
"\x00\x0f\x00\x08\x00\x44BOSTON"
# OptRecordRdata containing an EDE opt with specified length
# shorter than provided data.
"\x00\x0f\x00\x04\x00\x12WACHUSETT"
# OptRecordRdata containing a Padding opt.
"\x00\x0c\x00\x09LEXINGTON"
"\x00\x0c\x00\x02\x00\x00"
# OptRecordRdata containing an EDE opt with Non-UTF-8 extra text.
"\x00\x0f\x00\x06\x00\x44\xb1\x05\xf0\x0d"
# OptRecordRdata containing an EDE opt with insufficient data size.
"\x00\x0f\x00\x01\x00"
# OptRecordRdata containing an EDE opt with data length longer than data.
"\x00\x0f\x00\x06\x00\x03AB"
# This part has been generated with testing/libfuzzer/dictionary_generator.py
# using net_dns_record_fuzzer binary, RFC 1034 and RFC 1035.
"all"
"QNAME=ISI.EDU.,"
"pointing"
"C.ISI.EDU,"
"C.ISI.EDU."
"C.ISI.EDU)"
"52.0.0.10.IN-ADDR.ARPA."
"[RFC-799]"
"XX.LCS.MIT.EDU,"
"XX.LCS.MIT.EDU."
"CPU"
"C.ISI.EDU:"
"A.B.C.D"
"ARPA"
"*.X.COM"
"IN-ADDR.ARPA"
"0"
"\"*.X\","
"resources"
"supported"
"string"
"returning"
"AXFR"
"YALE.ARPA."
"B.C.D,"
"list"
"large"
"CNAME,"
"ASCII"
"M."
"YALE.EDU."
"direct"
"IN,"
"[RFC-1035]."
"\"A\""
"\"IN-ADDR.ARPA\"."
"HINFO"
"RFC-1031,"
"QCLASS=IN,"
"Z."
"QCLASS=IN."
"ARPANET"
"QNAME=65.0.6.26.IN-ADDR.ARPA.,QCLASS=IN,QTYPE=PTR"
"section"
"51.0.0.10.IN-ADDR.ARPA."
"|(VAXA.ISI.EDU,VENERA.ISI.EDU,"
"DEC-2060"
"version"
"[RFC-1031]."
"TTL"
"[RFC-742]"
"QTYPE=NS"
"FTP"
"hash"
"QTYPE=CNAME,"
"RFC-793,"
"address"
"SNAME,"
"["
"\"NAME/FINGER\","
"SRI-NIC.ARPA."
"SRI-NIC.ARPA,"
"MB"
"SRI-NIC.ARPA:"
"QTYPE=CNAME"
"NOT"
"MX"
"[RFC-821]"
"useful"
"select"
"SRI-NIC.ARPA"
"use"
"SNAME"
"from"
"to"
"positive"
"(QCLASS)"
"[RFC-1032]."
"(DNS),"
"TELNET,"
"call"
"B.X,"
"memory"
"type"
"[RFC-973]"
"RFC-822."
"QNAME=SIR-NIC.ARPA,"
"MILNET"
"TOPS20"
"[IEN-116,"
"PTR)."
"HOSTS.TXT,"
"COMSAT,"
"EXPIRE."
"must"
"EVEN"
"|(C.ISI.EDU,SRI-NIC.ARPA"
"QNAME=USC-ISIC.ARPA.,"
"this"
"CNAME."
"work"
"EDU,"
"EDU."
"EDU"
"following"
"root"
"[RFC-1010]"
"F."
"J.,"
"type."
"high"
"[RFC-953]"
"US"
"allowed"
"serial"
"IEN-116,"
"[RFC-1032]"
"[RFC-1033]."
"write"
"NOSC"
"VENERA.ISI.EDU.|"
"Z.X"
"A"
"QTYPE,"
"[RFC-810]"
"QTYPE."
"may"
"after"
"RFC-1032,"
"such"
"data"
"\"A"
"a"
"UDP"
"short"
"(CNAME)"
"[RFC-1002]"
"UDEL.EDU."
"SRI,"
"RFC-953."
"RFC-953,"
"TELNET)."
"(HOSTS.TXT)"
"ISI.EDU"
"MIL"
"[RFC-952]"
"RFC-830,"
"pointer"
"its"
"STYPE"
"before"
"HAS"
"RR"
"HOSTMASTER.SRI-NIC.ARPA."
"65.0.6.26.IN-ADDR.ARPA,"
"65.0.6.26.IN-ADDR.ARPA."
"RD"
"NAMES"
"YALE"
"QNAME=BRL.MIL,"
"RA,"
"ACM,"
"QCLASS"
"ARPA."
"not"
"(QTYPE),"
"OPCODE=SQUERY,RESPONSE"
"name"
"RFC,"
"mode"
"RFC-799,"
"ICS.UCI"
"RESOLVERS"
"A.X.COM"
"SOME"
"CNAME"
"UDEL"
"(QNAME),"
"E."
"space"
"L."
"MINIMUM"
"RDATA"
"supports"
"REFRESH,"
"[email protected]."
"This"
"SLIST:"
"free"
"RFC"
"base"
"RFC-952"
"received."
"SLIST."
"SLIST,"
"DATA."
"thread"
"YALE-BULLDOG.ARPA."
"could"
"QCLASS,"
"times"
"length"
"[email protected]"
"MIT.EDU"
"already"
"CONFIGURED"
"number"
"one"
"RFC-"
"Start"
"ISI"
"RFC."
"RFC-1001,"
"open"
"CSNET"
"size"
"\""
"X."
"A.ISI.EDU"
"TTL)"
"\"HOSTNAME"
"unknown"
"top"
"SERVERS"
"too"
"RFC-953]."
"QTYPE"
"BBN"
"that"
"completed"
"XX"
"*.A.X.COM"
"QTYPE=MX,"
"MX."
"RD."
"K."
"target"
"16"
"Z.X),"
"LCS.MIT.EDU"
"[RFC-1031]"
"and"
"[RFC-805]"
"[RFC-811]"
"(RCODE)"
"have"
"need"
"RESPONSE,"
"null"
"any"
"contents"
"|(SRI-NIC.ARPA,"
"SOMEONE"
"RESOURCE"
"73.0.0.26.IN-ADDR.ARPA."
"DARPA"
"ACC.ARPA."
"RFC-812,"
"-"
"mechanism"
"internal"
"take"
"which"
"MIL."
"MIL,"
"="
"UCI"
"RFC-742,"
"multiple"
"TCP/IP"
"USC-ISIC.ARPA."
"QNAME=USC-ISIC.ARPA,"
"The"
"]"
"class"
"D."
"RFC-1010,"
"D,"
"RFC-805,"
"AA,"
"VAXA.ISI.EDU."
"QNAME=ISI.EDU,"
"MG)."
"\"DOD"
"QNAME=SRI-NIC.ARPA,"
"text"
"labels"
"VENERA"
"RFC-1033,"
"INCORRECTLY"
"[RFC-"
"Z"
"[RFC-952,"
"RECORDS"
"implementation"
"true"
"cache"
"[RFC-768]"
"XX.LCS.MIT.EDU"
"only"
"[email protected]."
"RETRY,"
"get"
"[email protected]"
"ACHILLES"
"LOUIE.UDEL.EDU."
"IN-ADDR"
"resource"
"A.ISI"
"THIS"
"NIC"
"(via"
"Zones"
"RFC-920,"
"J."
"RFC-920."
"common"
"set"
"configured"
"QNAME=SRI-NIC.ARPA.,"
"this,"
"are"
"RFC-883]."
"A.ISI.EDU."
"A.ISI.EDU)"
"INTRODUCTION"
"TCP"
"MIT"
"PC"
"unable"
"probably"
"C.D,"
"103.0.3.26.IN-ADDR.ARPA."
"available"
"C"
"parent"
"RFC-830]."
"REFRESH"
"UNIX"
"CH)."
"key"
"52.0.0.10.IN-ADDR.ARPA"
"P."
"AND"
"RFC-1002,"
"OPCODE=SQUERY"
"ROME.UCI"
"LCS"
"PDP-11/70"
"ISI.EDU,"
"ISI.EDU."
"MAILB"
"[RFC-974]"
"CONCEPTS"
"[RFC-920]"
"SOA,"
"RCODE=NE"
"DNS."
"DNS,"
"poll"
"UMN-REI-UC.ARPA."
"SNAME."
"[RFC-883]"
"RFC-974,"
"RFC-1002"
"create"
"S.,"
"."
"[RFC-830]"
"expected"
"empty"
"RA"
"CH"
"(RD)"
"VENERA.ISI.EDU."
"SRI"
"A.B.X,"
"NAME"
"value"
"while"
"error"
"loop"
"\"NICNAME/WHOIS\","
"is"
"CACHE"
"FACILITIES"
"in"
"|(XX.LCS.MIT.EDU,"
"SOA"
"binary"
"[RFC-819]"
")"
"SRI-NIC"
"V."
"\"A\"."
"QNAME."
"QNAME,"
"units"
"(NE)."
"used"
"IP"
"\"."
"IN"
"ID"
"IF"
"task"
"SCENARIO"
"RFC-883,"
"HOSTS.TXT"
"Names"
"RFC-811,"
"the"
"If"
"being"
"EXPIRE"
"RFC-882,"
"|ACHILLES.MIT.EDU)"
"XX.COM."
"(RDATA)"
"source"
"CSNET."
"build"
"ACHILLES.MIT.EDU."
"format"
"read"
"(AA)"
"ISIC.ARPA,"
"SERIAL"
"VAXA.ISI"
"found,"
"SLIST"
"sorting"
"OPCODE=SQUERY,"
"OF"
"AUTHORITY"
"OS"
"AA"
"DOMAIN"
"because"
"SRI-NIC.ARPA.|"
"some"
"back"
"growth"
"USC-ISIC.ARPA,"
"RFC-821,"
"happens"
"for"
"W."
"RFC-883"
"X.COM"
"avoid"
"does"
"allocate"
"COM"
"assuming"
"BRL"
"PTR"
"[RFC-793]"
"be"
"QCLASS=*"
"MIT.EDU."
"by"
"C."
"on"
"SCLASS"
"of"
"FTP)"
"FTP,"
"UK"
"or"
"ACC"
"SBELT."
"SBELT,"
"No"
"(SBELT)"
"A.X.COM."
"A.X.COM,"
"REFERENCES"
"USC-ISIC.ARPA"
"[RFC-1001]"
"RESPONSE"
"transfer"
"support"
"*"
"NE"
"long"
"QTYPE=*"
"start"
"C.ISI.EDU"
"TTL,"
"RD,"
"\"4.3.2.1.IN-ADDR.ARPA\"."
"NS"
"was"
"RR."
"RR,"
"QTYPE=A"
"MEMO"
"but"
"QNAME"
"[RFC-1001,"
"DNS"
"line"
"trying"
"with"
"TCP/UDP"
"count"
"SBELT"
"(NIC)"
"up"
"classes:"
"RFC-768,"
"[IEN-116]"
"VAXA"
"NETBIOS"
"called"
"delete"
"CIC"
"USC-"
"RETRY"
"RFC-810,"
"RECORDS,"
"an"
"To"
"as"
"at"
"file"
"[RFC-812]"
"physical"
"X.COM,"
"no"
"[RFC-882,"
"when"
"A,"
"virtual"
"RFC-952,"
"RFC-952."
"valid"
"test"
"you"
"IP/TCP"
"STATUS"
"requested"
"[RFC-974"
"SPACE"
"QNAME=SIR-NIC.ARPA.,"
"RFC-819,"
"variable"
"[RFC-882]"
"BIBLIOGRAPHY"
"[RFC-1033]"
"US."
"\"MILNET"
"As"
"RFC-973,"
"RFC-882"
"QTYPE=MX"
"4.0.10.18.IN-ADDR.ARPA."
"FOO.F.ISI.ARPA,"
"Assuming"
"[RFC-1034],"
"[RFC-1034]."
"UNIX\""
"IMPLEMENTATION"
"EGP."
"ANCOUNT"
"@"
"P"
"TXT-DATA"
"RMAILBX"
"|QTYPE=A,"
"QDCOUNT"
"[RFC-1010]."
"EMAILBX"
"IN-"
"OPCODE=IQUERY,"
"MX)"
"ID=997"
"\"VENERA.ISI.EDU\";"
"OPCODE"
"MILNET-GW.ISI.EDU."
"52.0.2.10.IN-ADDR.ARPA."
"objects"
"MD"
"MG"
"MF"
"MR"
"QNAME=10.IN-ADDR.ARPA."
"S."
"GGP"
"few"
"QTYPE=PTR,"
"MD,"
"F"
"[RFC-974]."
"MGMNAME"
"GW.LCS.MIT.EDU."
"GW.LCS.MIT.EDU,"
"V"
"\\DDD"
"ALL"
"10.IN-ADDR.ARPA."
"closing"
"EXCHANGE."
"MADNAME."
"$ORIGIN"
"HIS"
"26.IN-ADDR.ARPA."
"(MD)"
"QTYPES"
"PROTOCOL"
"26.IN-ADDR.ARPA"
"NSCOUNT"
"(MR)"
"PREFERENCE"
"<BIT"
"$INCLUDE."
"MR)"
"VAXA.ISI.EDU"
"77.0.0.10.IN-ADDR.ARPA."
"\"IBM-PC"
"$INCLUDE"
"SERVER"
"18.IN-ADDR.ARPA."
"ADDRESS"
"Check"
"static"
"GW.ISI.EDU."
"(QNAME)."
"GW.ISI.EDU,"
"F.ISI.ARPA,"
"F.ISI.ARPA."
"time."
"PTRDNAME"
"HOSTMASTER@SRI-"
"(STATUS)"
"(MINFO)"
"(MG)"
"QCLASS."
"(HS)"
"X,"
"MNAME"
"QNAME=VENERA.ISI.EDU"
"MASTER"
"(IN)"
"KNOWS."
"RNAME"
"|QR|"
"VAXA.ISI.EDU,"
"R"
"1)"
"ARCOUNT"
"RCODE"
"NEWNAME"
"CLASS"
"begin"
"(MF)."
"Common"
"<RDATA>"
"QR"
"average"
"QNAME=6.0.0.10.IN-ADDR.ARPA,"
"WKS"
"SYSTEM,"
"MADNAME"
"ARPANET,"
"MINFO"
"DEFINITIONS"
"failed"
"[RFC-1034]"
"(QCLASS),"
"SPECIFICATION"
"X"
"THE"
"MILNET."
"MILNET-"
"bytes"
"(MX)"
"NSDNAME"
"10.IN-ADDR.ARPA"
"|AA|TC|RD|RA|"
"QTYPE=A,"
"corruption"
"FOO.F.ISI.ARPA"
"(QUERY)"
"MF,"
"FOO"
"CURLEY"
"X.Y,"
"AXFR,"
"S"
"MAILA"
"exceeds"
"ISI.EDU:"
"103.0.0.26.IN-ADDR.ARPA."
"MOE"
"[RFC-822]."
"CHAOS"
"[email protected]"
"SOA."
"RESOLVER"
"A.X,"
"EXCHANGE"
"SMTP"
"QCLASS=*,"
"CS"
"$ORIGIN,"
"B.X"
"(MB,"
"TYPE"
"Size"
"parse"
"ADDR.ARPA"
"(SMTP)."
"key."
"MAP>"
"OWN"
"VENERA.ISI.EDU"
"DDD."
"MB."
"NS,"
"I"
"OPCODE=RESPONSE,"
"ARPA,"
"WITHIN"
"tables"
"unsigned"
"LARRY"
"D"
"\\X"
"WHICH"
"(IQUERY)"
"QCLASS=IN"
"discarded"
"6.0.0.10.IN-ADDR.ARPA."
"MAIL"
"QTYPE=MAILB"
"HS"
"SUPPORT"
"STOOGES"
"X.Y"
"/"
"(SLIST)."
"O"
"OS,"
"OFFSET"
"FILES"
"RR),"
"$INCLUDE,"
"guard"
"[<TTL>]"
"CRLF"
"Error"
"ERRORS-TO:"
"22.0.2.10.IN-ADDR.ARPA."
"default"
"MESSAGES"
"signed"
"<SUBSYS>ISI-MAILBOXES.TXT"
"MULTICS.MIT.EDU."
"NULL"
"application"
"TXT"
"TC"
"PROTOCOL=TCP"
"UDP."
"UDP,"
"F.ISI.ARPA"
"(EXPERIMENTAL)"
"RDLENGTH"
"NIC.ARPA"