coredns/test
Miek Gieben 5d80a6e21e
Fix obsure crash in Corefile parsing (#4637)
This was found by fuzzing.

We need to make this a fully qualified domain name to catch all errors
in dnsserver/register.go and not later when plugin.Normalize() is called again on these
strings, with the prime difference being that the domain name is fully
qualified. This was found by fuzzing where "ȶ" is deemed OK, but "ȶ." is
not (might be a bug in miekg/dns actually). But here we were checking ȶ,
which is OK, and later we barf in ȶ. leading to "index out of range".

Added a tests and check manually if it would crash with the current code
(yes), and fail with an error in this PR (yes).

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-19 10:38:37 -07:00
..
auto_test.go auto test: increase sleep (#4282) 2020-11-11 13:30:20 +01:00
cache_test.go cache: do the msg copy right (#4207) 2020-10-15 07:47:07 -07:00
chaos_test.go core: fix crash with no plugins (#4184) 2020-10-07 15:58:14 +02:00
compression_scrub_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
corefile_test.go Fix obsure crash in Corefile parsing (#4637) 2021-05-19 10:38:37 -07:00
doc.go Run gostaticheck (#3325) 2019-10-01 07:41:29 +01:00
ds_file_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
edns0_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
erratic_autopath_test.go cleanup tempfiles for erratic_autopath_test (#4080) 2020-08-20 06:11:56 -07:00
etcd_cache_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
etcd_credentials_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
etcd_test.go Fix etcd to use v3.5.0-alpha.0 (#4628) 2021-05-14 23:55:01 -07:00
example_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_cname_proxy_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_loop_test.go plugin/file: guard against cname loops (#4387) 2021-01-15 18:26:04 +00:00
file_reload_test.go test: Fix rare race condition in TestZoneReload (#4617) 2021-05-11 09:11:20 +02:00
file_serve_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_srv_additional_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
file_test.go Remove duplicated TempFile testsuit (#2508) 2019-01-28 07:25:14 +00:00
file_upstream_test.go plugin/file: Use NXDOMAIN response if CNAME target is NXDOMAIN (#4303) 2020-12-09 09:44:31 +01:00
file_xfr_test.go Speed up testing (#4239) 2020-10-30 10:27:04 +01:00
fuzz_corefile.go fuzz: use gofuzz build tag instead of fuzz (#3185) 2019-08-25 13:02:44 +00:00
grpc_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
hosts_file_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
log_test.go Clean up tests logging (#1979) 2018-07-19 16:23:06 +01:00
metric_naming_test.go Remove newlines between braces (#4279) 2020-11-11 18:45:01 +01:00
metrics_test.go reduce sleeps (#4205) 2020-10-15 04:19:39 -07:00
miek_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
no_plugins_test.go core: fix crash with no plugins (#4184) 2020-10-07 15:58:14 +02:00
plugin_dnssec_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
presubmit_test.go Fix import ordering presubmit test (#4422) 2021-01-24 17:28:49 +00:00
proxy_health_test.go Speed up testing (#4239) 2020-10-30 10:27:04 +01:00
proxy_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
readme_test.go Add check for Also See for READMEs (#4261) 2020-11-05 11:52:24 +01:00
reload_test.go Speed up testing (#4239) 2020-10-30 10:27:04 +01:00
reverse_test.go Default to upstream to self (#2436) 2019-01-13 16:54:49 +00:00
rewrite_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
secondary_test.go plugin/transfer: only allow outgoing axfr over tcp (#4452) 2021-02-05 10:51:29 +01:00
server.go For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
server_reverse_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
server_test.go reverse zones (#4538) 2021-05-11 09:50:18 +02:00
template_upstream_test.go Fix mixed indentation within tests (#3855) 2020-04-25 08:08:36 +02:00
wildcard_test.go Remove newlines between braces (#4279) 2020-11-11 18:45:01 +01:00