mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Merge branch 'marka-fuzz-fixes' into 'main'
Add issues found by dns_rdata_fromwiretext fuzzer. See merge request isc-projects/bind9!3953
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,6 +1,8 @@
|
||||
*.sln.in eol=crlf
|
||||
*.vcxproj.* eol=crlf
|
||||
|
||||
/fuzz/dns_rdata_fromwire_text.in/input-* -text
|
||||
|
||||
.gitignore export-ignore
|
||||
/conftools export-ignore
|
||||
/doc/design export-ignore
|
||||
|
8
CHANGES
8
CHANGES
@@ -1,3 +1,11 @@
|
||||
5489. [bug] Named failed to reject some invalid records resulting
|
||||
in records that, after being printed, could not be
|
||||
loaded or would result in DNSSEC validation failures
|
||||
when re-read from zone files as the wire format
|
||||
differed. The covered records records are: CERT,
|
||||
IPSECKEY, NSEC3, NSEC3PARAM, NXT, SIG, TLSA, WKS, and
|
||||
X25. [GL !3953]
|
||||
|
||||
5488. [bug] nta needed to have a weak reference on view to prevent
|
||||
the view being deleted while nta tests are being
|
||||
performed. [GL #2067]
|
||||
|
@@ -59,13 +59,21 @@ LLVMFuzzerInitialize(int *argc __attribute__((unused)),
|
||||
|
||||
static void
|
||||
nullmsg(dns_rdatacallbacks_t *cb, const char *fmt, ...) {
|
||||
va_list args;
|
||||
|
||||
UNUSED(cb);
|
||||
UNUSED(fmt);
|
||||
|
||||
if (debug) {
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
fprintf(stderr, "\n");
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
char totext[1024];
|
||||
char totext[64 * 1044 * 4];
|
||||
dns_compress_t cctx;
|
||||
dns_decompress_t dctx;
|
||||
dns_rdatatype_t rdtype;
|
||||
@@ -113,10 +121,15 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
rdclass = classlist[(*data++) % classes];
|
||||
size--;
|
||||
|
||||
if (debug) {
|
||||
fprintf(stderr, "type=%u, class=%u\n", rdtype, rdclass);
|
||||
}
|
||||
|
||||
dns_rdatacallbacks_init(&callbacks);
|
||||
callbacks.warn = callbacks.error = nullmsg;
|
||||
|
||||
dns_decompress_init(&dctx, -1, DNS_DECOMPRESS_ANY);
|
||||
/* Disallow decompression as we are reading a packet */
|
||||
dns_decompress_init(&dctx, -1, DNS_DECOMPRESS_NONE);
|
||||
|
||||
isc_buffer_constinit(&source, data, size);
|
||||
isc_buffer_add(&source, size);
|
||||
@@ -129,14 +142,20 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
*/
|
||||
CHECK(dns_rdata_fromwire(&rdata1, rdclass, rdtype, &source, &dctx, 0,
|
||||
&target));
|
||||
assert(rdata1.length == size);
|
||||
|
||||
/*
|
||||
* Convert to text from wire.
|
||||
*/
|
||||
isc_buffer_init(&target, totext, sizeof(totext));
|
||||
isc_buffer_init(&target, totext, sizeof(totext) - 1);
|
||||
result = dns_rdata_totext(&rdata1, NULL, &target);
|
||||
assert(result == ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* Make debugging easier by NUL terminating.
|
||||
*/
|
||||
totext[isc_buffer_usedlength(&target)] = 0;
|
||||
|
||||
/*
|
||||
* Convert to wire from text.
|
||||
*/
|
||||
|
BIN
fuzz/dns_rdata_fromwire_text.in/input-0
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-0
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-1
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-1
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-10
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-10
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-100
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-100
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-101
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-101
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-102
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-102
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-103
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-103
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-104
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-104
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-105
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-105
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-106
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-106
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-107
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-107
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-108
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-108
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-109
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-109
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-11
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-11
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-110
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-110
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-111
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-111
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-112
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-112
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-113
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-113
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-114
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-114
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-115
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-115
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-116
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-116
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-117
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-117
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-118
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-118
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-119
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-119
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-12
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-12
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-120
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-120
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-121
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-121
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-122
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-122
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-123
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-123
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-124
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-124
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-125
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-125
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-126
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-126
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-127
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-127
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-128
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-128
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-129
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-129
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-13
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-13
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-130
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-130
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-131
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-131
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-132
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-132
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-133
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-133
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-134
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-134
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-135
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-135
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-136
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-136
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-137
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-137
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-138
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-138
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-139
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-139
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-14
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-14
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-140
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-140
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-141
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-141
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-142
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-142
Normal file
Binary file not shown.
1
fuzz/dns_rdata_fromwire_text.in/input-143
Normal file
1
fuzz/dns_rdata_fromwire_text.in/input-143
Normal file
@@ -0,0 +1 @@
|
||||
d$3<><33>
|
BIN
fuzz/dns_rdata_fromwire_text.in/input-15
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-15
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-16
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-16
Normal file
Binary file not shown.
1
fuzz/dns_rdata_fromwire_text.in/input-17
Normal file
1
fuzz/dns_rdata_fromwire_text.in/input-17
Normal file
@@ -0,0 +1 @@
|
||||
d<EFBFBD>#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><10>Į<EFBFBD><C4AE><EFBFBD><EFBFBD>d<EFBFBD><64><EFBFBD><EFBFBD><EFBFBD>d
|
BIN
fuzz/dns_rdata_fromwire_text.in/input-18
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-18
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-19
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-19
Normal file
Binary file not shown.
1
fuzz/dns_rdata_fromwire_text.in/input-2
Normal file
1
fuzz/dns_rdata_fromwire_text.in/input-2
Normal file
@@ -0,0 +1 @@
|
||||
4A-<2D>
|
BIN
fuzz/dns_rdata_fromwire_text.in/input-20
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-20
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-21
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-21
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-22
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-22
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-23
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-23
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-24
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-24
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-25
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-25
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-26
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-26
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-27
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-27
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-28
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-28
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-29
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-29
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-3
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-3
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-30
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-30
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-31
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-31
Normal file
Binary file not shown.
1
fuzz/dns_rdata_fromwire_text.in/input-32
Normal file
1
fuzz/dns_rdata_fromwire_text.in/input-32
Normal file
@@ -0,0 +1 @@
|
||||
d<06><>
|
BIN
fuzz/dns_rdata_fromwire_text.in/input-33
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-33
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-34
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-34
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-35
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-35
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-36
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-36
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-37
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-37
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-38
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-38
Normal file
Binary file not shown.
1
fuzz/dns_rdata_fromwire_text.in/input-39
Normal file
1
fuzz/dns_rdata_fromwire_text.in/input-39
Normal file
@@ -0,0 +1 @@
|
||||
|
BIN
fuzz/dns_rdata_fromwire_text.in/input-4
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-4
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-40
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-40
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-41
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-41
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-42
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-42
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-43
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-43
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-44
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-44
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-45
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-45
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-46
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-46
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-47
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-47
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-48
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-48
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-49
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-49
Normal file
Binary file not shown.
1
fuzz/dns_rdata_fromwire_text.in/input-5
Normal file
1
fuzz/dns_rdata_fromwire_text.in/input-5
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>˛<EFBFBD>
|
1
fuzz/dns_rdata_fromwire_text.in/input-50
Normal file
1
fuzz/dns_rdata_fromwire_text.in/input-50
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>|8<><38><EFBFBD>|<7C>|8<>|<7C>|8
|
BIN
fuzz/dns_rdata_fromwire_text.in/input-51
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-51
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-52
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-52
Normal file
Binary file not shown.
1
fuzz/dns_rdata_fromwire_text.in/input-53
Normal file
1
fuzz/dns_rdata_fromwire_text.in/input-53
Normal file
@@ -0,0 +1 @@
|
||||
<13>(
|
BIN
fuzz/dns_rdata_fromwire_text.in/input-54
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-54
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-55
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-55
Normal file
Binary file not shown.
BIN
fuzz/dns_rdata_fromwire_text.in/input-56
Normal file
BIN
fuzz/dns_rdata_fromwire_text.in/input-56
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user