Commit graph

3 commits

Author SHA1 Message Date
Paco Xu
ae65f4e0c7
fix TestCorefile1 panic for nil handling (#6802)
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2024-08-05 06:47:04 -04:00
Frederic Hemery
db17037a25
Fix outdated test (#6747)
Signed-off-by: Frederic Hemery <frederic.hemery@datadoghq.com>
2024-07-01 10:52:11 -04:00
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