]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 years agoDrop FreeBSD 11
Michal Nowak [Tue, 30 Nov 2021 14:45:39 +0000 (15:45 +0100)] 
Drop FreeBSD 11

Support for FreeBSD 11.4, the last FreeBSD 11.x release, ended on
September 30, 2021.

The "--with-readline" ./configure option has been added to gcc:sid:amd64
CI job; otherwise, it would be lost with the FreeBSD 11 removal.

Link: https://www.freebsd.org/security/unsupported/
4 years agoMerge branch '3057-evp_digestsignfinal-needs-the-buffer-length-passed-in' into 'main'
Mark Andrews [Fri, 17 Dec 2021 10:27:41 +0000 (10:27 +0000)] 
Merge branch '3057-evp_digestsignfinal-needs-the-buffer-length-passed-in' into 'main'

Resolve "EVP_DigestSignFinal needs the buffer length passed in"

Closes #3057

See merge request isc-projects/bind9!5642

4 years agoAdd CHANGES for [GL #3057]
Mark Andrews [Wed, 15 Dec 2021 10:32:49 +0000 (21:32 +1100)] 
Add CHANGES for [GL #3057]

4 years agoPass the digest buffer length to EVP_DigestSignFinal
Mark Andrews [Wed, 15 Dec 2021 10:27:49 +0000 (21:27 +1100)] 
Pass the digest buffer length to EVP_DigestSignFinal

OpenSSL 3.0.1 does not accept 0 as a digest buffer length when
calling EVP_DigestSignFinal as it now checks that the digest buffer
length is large enough for the digest.  Pass the digest buffer
length instead.

4 years agoMerge branch 'mnowak/alpine-3.15' into 'main'
Michal Nowak [Thu, 16 Dec 2021 15:52:18 +0000 (15:52 +0000)] 
Merge branch 'mnowak/alpine-3.15' into 'main'

Add Alpine Linux 3.15

See merge request isc-projects/bind9!5595

4 years agoAdd Alpine Linux 3.15
Michal Nowak [Thu, 25 Nov 2021 17:59:57 +0000 (18:59 +0100)] 
Add Alpine Linux 3.15

4 years agoMerge branch 'pspacek/ci-api-triggers' into 'main'
Petr Špaček [Thu, 16 Dec 2021 15:00:29 +0000 (15:00 +0000)] 
Merge branch 'pspacek/ci-api-triggers' into 'main'

Enable regular pipeline jobs to be triggered from Gitlab API

See merge request isc-projects/bind9!5648

4 years agoEnable regular pipeline jobs to be triggered from Gitlab API
Petr Špaček [Thu, 16 Dec 2021 14:55:01 +0000 (15:55 +0100)] 
Enable regular pipeline jobs to be triggered from Gitlab API

4 years agoMerge branch 'v9_17_21-release' into 'main'
Petr Špaček [Thu, 16 Dec 2021 12:22:45 +0000 (12:22 +0000)] 
Merge branch 'v9_17_21-release' into 'main'

Merge 9.17.21 release branch

See merge request isc-projects/bind9!5644

4 years agoSet up release notes for BIND 9.17.22
Petr Špaček [Wed, 15 Dec 2021 15:50:49 +0000 (16:50 +0100)] 
Set up release notes for BIND 9.17.22

4 years agoUpdate BIND version to 9.17.21
Petr Špaček [Mon, 6 Dec 2021 16:19:03 +0000 (17:19 +0100)] 
Update BIND version to 9.17.21

4 years agoAdd a CHANGES marker
Petr Špaček [Mon, 6 Dec 2021 16:18:10 +0000 (17:18 +0100)] 
Add a CHANGES marker

4 years agoMerge branch 'michal/prepare-documentation-for-bind-9.17.21' into 'v9_17_21-release'
Petr Špaček [Mon, 6 Dec 2021 16:14:47 +0000 (16:14 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.17.21' into 'v9_17_21-release'

Prepare documentation for BIND 9.17.21

See merge request isc-private/bind9!338

4 years agoPrepare release notes for BIND 9.17.21
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Prepare release notes for BIND 9.17.21

4 years agoReorder release notes
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Reorder release notes

4 years agoMention GL #3040 in the release notes
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Mention GL #3040 in the release notes

4 years agoAdd release note for GL #853
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Add release note for GL #853

4 years agoTweak and reword release notes
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Tweak and reword release notes

4 years agoTweak recent additions to the ARM
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Tweak recent additions to the ARM

4 years agoMerge branch 'mnowak/respdiff-add-third-party-server-support' into 'main'
Michal Nowak [Thu, 16 Dec 2021 11:51:46 +0000 (11:51 +0000)] 
Merge branch 'mnowak/respdiff-add-third-party-server-support' into 'main'

Add respdiff jobs with third-party recursors

See merge request isc-projects/bind9!5355

4 years agoAdd respdiff job with third-party recursors
Michal Nowak [Mon, 16 Aug 2021 17:07:07 +0000 (19:07 +0200)] 
Add respdiff job with third-party recursors

The order of directories with reference and test BIND 9 are now reversed
for respdiff.sh.

Drop unnecessary dependency on the tarball-create job.

The data.mdb file has more than 10 GB and makes artifact download take
an unnecessarily long time.

4 years agoMerge branch '2398-adjust-the-dns_message-mempools' into 'main'
Ondřej Surý [Wed, 15 Dec 2021 20:43:00 +0000 (20:43 +0000)] 
Merge branch '2398-adjust-the-dns_message-mempools' into 'main'

Reduce freemax values for dns_message mempools

Closes #2398

See merge request isc-projects/bind9!5646

4 years agoReduce freemax values for dns_message mempools
Ondřej Surý [Wed, 15 Dec 2021 16:48:28 +0000 (17:48 +0100)] 
Reduce freemax values for dns_message mempools

It was discovered that NAME_FREEMAX and RDATASET_FREEMAX was based on
the NAME_FILLCOUNT and RDATASET_FILLCOUNT respectively multiplied by 8
and then when used in isc_mempool_setfreemax, the value would be again
multiplied by 32.

Keep the 8 multiplier in the #define and remove the 32 multiplier as it
was kept in error.  The default fillcount can fit 99.99% of the requests
under normal circumstances, so we don't need to keep that many free
items on the mempool.

4 years agoMerge branch '3055-examine-netlink-messages' into 'main'
Artem Boldariev [Wed, 15 Dec 2021 18:04:25 +0000 (18:04 +0000)] 
Merge branch '3055-examine-netlink-messages' into 'main'

Resolve #3055 by examining RTM_NEWADDR, RTM_DELADDR messages contents

Closes #3056 and #3055

See merge request isc-projects/bind9!5638

4 years agoModify CHANGES [GL #3055]
Artem Boldariev [Tue, 14 Dec 2021 17:30:45 +0000 (19:30 +0200)] 
Modify CHANGES [GL #3055]

Mention that we try to avoid spurious interface re-scans on Linux.

4 years agoremove ns_interface reference counting
Evan Hunt [Wed, 15 Dec 2021 16:27:28 +0000 (08:27 -0800)] 
remove ns_interface reference counting

reference counting of ns_interface objects has not been used
since the clientmgr cleanup in #2433, and it no longer really
makes sense now - when we want to destroy an interface on a
rescan, we want it to be destroyed, not kept active by some
other caller. so ns_interface_attach() has been removed,
ns_interface_detach() has been replaced with a static
interface_destroy(), and do_scan() has been simplified
accordingly.

4 years agokeep track of non-listening interfaces
Evan Hunt [Wed, 15 Dec 2021 00:51:02 +0000 (16:51 -0800)] 
keep track of non-listening interfaces

previously, if "listen-on-v6" was set to "none", then every
time a scan saw an IPv6 address it would appear to be a new
one.  this commit retains all known interfaces in a list
and sets a flag in the ones that are listening, so that
configured interfaces that have been seen before will be
recognized as such.

as an incidental fix, the ns__interfacemgr_getif() and _nextif()
functions have been removed since they were never used.

4 years agoExamine RTM_NEWADDR, RTM_DELADDR messages contents
Artem Boldariev [Tue, 14 Dec 2021 11:38:28 +0000 (13:38 +0200)] 
Examine RTM_NEWADDR, RTM_DELADDR messages contents

This commit modifies the NetLink handling code in such a way
that the contents of the messages we are interested in is checked
for the local addresses changes only. This helps to avoid spurious
interface re-scans.

The 'route_recv' log messages are also reduced from DEBUG(3) to
DEBUG(9).

4 years agoMerge branch 'ondrej/fix-isc_mem_setname-usage' into 'main'
Ondřej Surý [Tue, 14 Dec 2021 19:46:00 +0000 (19:46 +0000)] 
Merge branch 'ondrej/fix-isc_mem_setname-usage' into 'main'

Set the clientmgr isc_mem_t context name

See merge request isc-projects/bind9!5639

4 years agoSet the clientmgr isc_mem_t context name
Ondřej Surý [Tue, 14 Dec 2021 12:02:50 +0000 (13:02 +0100)] 
Set the clientmgr isc_mem_t context name

The memory context created in the clientmgr context was missing a name,
so it was nameless in the memory context statistics.

Set the clientmgr memory context name to "clientmgr".

4 years agoMerge branch '2886-drop-cppcheck' into 'main'
Michal Nowak [Tue, 14 Dec 2021 14:07:57 +0000 (14:07 +0000)] 
Merge branch '2886-drop-cppcheck' into 'main'

Drop cppcheck

Closes #2886 and #2698

See merge request isc-projects/bind9!5574

4 years agoAdd CHANGES note for [GL #2886]
Michal Nowak [Tue, 30 Nov 2021 13:24:36 +0000 (14:24 +0100)] 
Add CHANGES note for [GL #2886]

4 years agoDrop cppcheck workarounds
Michal Nowak [Tue, 30 Nov 2021 15:31:48 +0000 (16:31 +0100)] 
Drop cppcheck workarounds

As cppcheck was removed from the CI, associated workarounds and
suppressions are not required anymore.

4 years agoDrop cppcheck CI job
Michal Nowak [Tue, 30 Nov 2021 12:52:49 +0000 (13:52 +0100)] 
Drop cppcheck CI job

Every cppcheck update brings the cost of addressing new false positives
in the BIND 9 source code while not reaping any benefits in case of
identified issues with the code.

4 years agoMerge branch '3056-interface-scan-tls-https-recreate-only-when-reconfiguring' into...
Arаm Sаrgsyаn [Tue, 14 Dec 2021 13:28:54 +0000 (13:28 +0000)] 
Merge branch '3056-interface-scan-tls-https-recreate-only-when-reconfiguring' into 'main'

Recreate HTTPS and TLS interfaces only during reconfiguration

Closes #3056

See merge request isc-projects/bind9!5636

4 years agoRecreate HTTPS and TLS interfaces only during reconfiguration
Aram Sargsyan [Tue, 14 Dec 2021 09:28:01 +0000 (09:28 +0000)] 
Recreate HTTPS and TLS interfaces only during reconfiguration

The 850e9e59bf8c29f895a981211c72c0b3c294bcfd commit intended to recreate
the HTTPS and TLS interfaces during reconfiguration, but they are being
recreated also during regular interface re-scans.

Make sure the HTTPS and TLS interfaces are being recreated only during
reconfiguration.

4 years agoMerge branch '3053-tls-listeners-recreate-on-reconfiguration' into 'main'
Arаm Sаrgsyаn [Mon, 13 Dec 2021 11:06:09 +0000 (11:06 +0000)] 
Merge branch '3053-tls-listeners-recreate-on-reconfiguration' into 'main'

Recreate TLS interfaces during reconfiguration

Closes #3053

See merge request isc-projects/bind9!5634

4 years agoAdd system test for checking TLS interfaces after a reconfiguration
Aram Sargsyan [Fri, 10 Dec 2021 10:12:20 +0000 (10:12 +0000)] 
Add system test for checking TLS interfaces after a reconfiguration

4 years agoAdd CHANGES for [GL #3053]
Aram Sargsyan [Fri, 10 Dec 2021 09:44:17 +0000 (09:44 +0000)] 
Add CHANGES for [GL #3053]

4 years agoRecreate TLS interfaces during reconfiguration
Aram Sargsyan [Thu, 9 Dec 2021 14:49:51 +0000 (14:49 +0000)] 
Recreate TLS interfaces during reconfiguration

For DoH and DoT listeners, a reconfiguration event triggers a creation
of a new 'SSL_CTX' TLS context, and a destruction of the old one.

The network manager, though, keeps using the old context which causes
errors.

During interface scanning, when a matching existing interface is found,
reuse it only when it doesn't have a TLS context, otherwise shut it down
and recreate with a new TLS context.

4 years agoMerge branch 'matthijs/pemensik-bug-main-isdir-error-rhbz490837' into 'main'
Matthijs Mekking [Fri, 10 Dec 2021 10:24:54 +0000 (10:24 +0000)] 
Merge branch 'matthijs/pemensik-bug-main-isdir-error-rhbz490837' into 'main'

Improve error message when directory name is given

See merge request isc-projects/bind9!5633

4 years agoImprove error message when directory name is given
Petr Menšík [Mon, 29 Nov 2021 23:04:35 +0000 (00:04 +0100)] 
Improve error message when directory name is given

Surprising error IO error is returned when directory name
is given instead of named.conf file. It can be passed to named-checkconf
or include statement. Make a simple change to return Invalid file
instead. Still not precise, but much better error message is returned.

Fix of rhbz#490837.

4 years agoMerge branch 'michal/remove-mutex-profiling-code' into 'main'
Michał Kępień [Thu, 9 Dec 2021 13:47:44 +0000 (13:47 +0000)] 
Merge branch 'michal/remove-mutex-profiling-code' into 'main'

Remove mutex profiling code

See merge request isc-projects/bind9!5629

4 years agoRemove mutex debugging code
Michał Kępień [Thu, 9 Dec 2021 13:02:36 +0000 (14:02 +0100)] 
Remove mutex debugging code

Mutex debugging code (used when the ISC_MUTEX_DEBUG preprocessor macro
is set to 1 and PTHREAD_MUTEX_ERRORCHECK is defined) has been broken for
the past 3 years (since commit 2f3eee5a4fdad6606135116c70875b3180c7ed83)
and nobody complained, which is a strong indication that this code is
not being used these days any more.  External tools for detecting
locking issues are already wired into various GitLab CI checks.  Drop
all code depending on the ISC_MUTEX_DEBUG preprocessor macro being set.

4 years agoRemove mutex profiling code
Michał Kępień [Thu, 9 Dec 2021 11:24:12 +0000 (12:24 +0100)] 
Remove mutex profiling code

Mutex profiling code (used when the ISC_MUTEX_PROFILE preprocessor macro
is set to 1) has been broken for the past 3 years (since commit
0bed9bfc28a204cde57c6f68170ecc89ebfa6dc8) and nobody complained, which
is a strong indication that this code is not being used these days any
more.  External tools for both measuring performance and detecting
locking issues are already wired into various GitLab CI checks.  Drop
all code depending on the ISC_MUTEX_PROFILE preprocessor macro being
set.

4 years agoMerge branch '3042-tcp-hang' into 'main'
Evan Hunt [Wed, 8 Dec 2021 18:48:34 +0000 (18:48 +0000)] 
Merge branch '3042-tcp-hang' into 'main'

prevent a shutdown hang on non-matching TCP responses

Closes #3042

See merge request isc-projects/bind9!5616

4 years agoCHANGES for [GL #3042]
Evan Hunt [Thu, 2 Dec 2021 20:13:56 +0000 (12:13 -0800)] 
CHANGES for [GL #3042]

4 years agoadd system test for a no-questions reply over TCP
Evan Hunt [Fri, 3 Dec 2021 19:29:56 +0000 (11:29 -0800)] 
add system test for a no-questions reply over TCP

4 years agoincidental cleanups
Evan Hunt [Thu, 2 Dec 2021 20:10:54 +0000 (12:10 -0800)] 
incidental cleanups

the 'dipsatchmgr->state' was never set, so the MGR_IS_SHUTTINGDOWN
macro was always false. both of these have been removed.

renamed the 'dispatch->state' field to 'tcpstate' to make its purpose
less ambiguous.

changed an FCTXTRACE log message from "response did not match question"
to the more correctly descriptive "invalid question section".

4 years agoprevent a shutdown hang on non-matching TCP responses
Evan Hunt [Thu, 2 Dec 2021 20:04:42 +0000 (12:04 -0800)] 
prevent a shutdown hang on non-matching TCP responses

When a non-matching DNS response is received by the resolver,
it calls dns_dispatch_getnext() to resume reading. This is necessary
for UDP but not for TCP, because TCP connections automatically
resume reading after any valid DNS response.

This commit adds a 'tcpreading' flag to TCP dispatches, so that
`dispatch_getnext()` can be called multiple times without subsequent
calls having any effect.

4 years agoMerge branch '3051-missing-destroy-for-pthread-primitives' into 'main'
Ondřej Surý [Wed, 8 Dec 2021 17:17:17 +0000 (17:17 +0000)] 
Merge branch '3051-missing-destroy-for-pthread-primitives' into 'main'

Stop leaking mutex in nmworker and cond in nm socket

Closes #3051

See merge request isc-projects/bind9!5622

4 years agoAdd CHANGES and release not for [GL #3051]
Ondřej Surý [Wed, 8 Dec 2021 10:24:47 +0000 (11:24 +0100)] 
Add CHANGES and release not for [GL #3051]

4 years agoStop leaking mutex in nmworker and cond in nm socket
Ondřej Surý [Mon, 6 Dec 2021 10:10:17 +0000 (11:10 +0100)] 
Stop leaking mutex in nmworker and cond in nm socket

On FreeBSD, the pthread primitives are not solely allocated on stack,
but part of the object lives on the heap.  Missing pthread_*_destroy
causes the heap memory to grow and in case of fast lived object it's
possible to run out-of-memory.

Properly destroy the leaking mutex (worker->lock) and
the leaking condition (sock->cond).

4 years agoMerge branch '3048-fix-isc_hp-initialization' into 'main'
Ondřej Surý [Wed, 8 Dec 2021 16:33:40 +0000 (16:33 +0000)] 
Merge branch '3048-fix-isc_hp-initialization' into 'main'

Fix the isc_hp initialization and memory usage

Closes #3048

See merge request isc-projects/bind9!5620

4 years agoReduce the number of hazard pointers
Ondřej Surý [Tue, 7 Dec 2021 19:35:58 +0000 (20:35 +0100)] 
Reduce the number of hazard pointers

Previously, we set the number of the hazard pointers to be 4 times the
number of workers because the dispatch ran on the old socket code.
Since the old socket code was removed there's a smaller number of
threads, namely:

 - 1 main thread
 - 1 timer thread
 - <n> netmgr threads
 - <n> threadpool threads

Set the number of hazard pointers to 2 + 2 * workers.

4 years agoFix the isc_hp initialization and memory usage
Ondřej Surý [Tue, 7 Dec 2021 10:15:27 +0000 (11:15 +0100)] 
Fix the isc_hp initialization and memory usage

Previously, the isc_hp_init() could not lower the value of
isc__hp_max_threads, but because of a mistake the isc__hp_max_threads
would be set to HP_MAX_THREADS (e.g. 128 threads) thus it would be
always set to 128.  This would result in increased memory usage even
when small number of workers were in use.

Change the default value of isc__hp_max_threads to be 1.

Additionally, enforce the max_hps value in isc_hp_new() to be smaller or
equal to HP_MAX_HPS.  The only user is isc_queue which uses just 1
hazard pointer, so it's only theoretical issue.

4 years agoMerge branch '1265-deprecate-broken-nsec' into 'main'
Petr Špaček [Mon, 6 Dec 2021 16:06:25 +0000 (16:06 +0000)] 
Merge branch '1265-deprecate-broken-nsec' into 'main'

Mark broken-nsec option as deprecated

See merge request isc-projects/bind9!5618

4 years agoMark broken-nsec option as deprecated
Petr Špaček [Mon, 6 Dec 2021 15:24:57 +0000 (16:24 +0100)] 
Mark broken-nsec option as deprecated

It's unclear if we are going to keep it or not, so let's mark it as
deprecated for a good measure. It's easier to un-deprecate it than the
other way around.

4 years agoMerge branch '3040-restore-the-fetch-context-expiry-timer' into 'main'
Michał Kępień [Fri, 3 Dec 2021 09:07:27 +0000 (09:07 +0000)] 
Merge branch '3040-restore-the-fetch-context-expiry-timer' into 'main'

Restore the fetch context expiry timer

Closes #3040

See merge request isc-projects/bind9!5612

4 years agoCHANGES for [GL #3040]
Evan Hunt [Fri, 3 Dec 2021 08:15:52 +0000 (00:15 -0800)] 
CHANGES for [GL #3040]

4 years agorestore the fetch lifetime timer
Evan Hunt [Thu, 2 Dec 2021 01:02:05 +0000 (17:02 -0800)] 
restore the fetch lifetime timer

the lifetime expiry timer for the fetch context was removed
when we switched to using in-band netmgr timeouts. however,
it turns out some dependency loops can occur between a fetch
and the ADB the validator; these deadlocks were formerly broken
when the timer fired, and now there's no timer. we can fix these
errors individually, but in the meantime we don't want the server
to get hung at shutdown because of dangling fetches.

this commit puts back a single timer, which fires two seconds
after the fetch should have completed, and shuts it down. it also
logs a message at level INFO so we know about the problems when
they occur.

4 years agoMerge branch '1265-bind-9-14-option-synth-from-dnssec-causing-high-cpu-consumption...
Petr Špaček [Thu, 2 Dec 2021 13:52:40 +0000 (13:52 +0000)] 
Merge branch '1265-bind-9-14-option-synth-from-dnssec-causing-high-cpu-consumption-and-degraded-client-experience' into 'main'

Rework rbtdb.c:find_coveringnsec to use shadow NSEC tree

Closes #1265

See merge request isc-projects/bind9!5446

4 years agoClarify that NSEC3 is not supported by synth-from-dnssec yet
Petr Špaček [Thu, 2 Dec 2021 08:59:04 +0000 (09:59 +0100)] 
Clarify that NSEC3 is not supported by synth-from-dnssec yet

4 years agoCheck reject-000-label
Mark Andrews [Wed, 1 Dec 2021 13:56:27 +0000 (00:56 +1100)] 
Check reject-000-label

4 years agoReject NSEC records with next field with \000 label
Mark Andrews [Wed, 1 Dec 2021 13:34:38 +0000 (00:34 +1100)] 
Reject NSEC records with next field with \000 label

A number of DNS implementation produce NSEC records with bad type
maps that don't contain types that exist at the name leading to
NODATA responses being synthesize instead of the records in the
zone.  NSEC records with these bad type maps often have the NSEC
NSEC field set to '\000.QNAME'.  We look for the first label of
this pattern.

e.g.
example.com NSEC \000.example.com SOA NS NSEC RRSIG
example.com RRRSIG NSEC ...
example.com SOA ...
example.com RRRSIG SOA ...
example.com NS ...
example.com RRRSIG NS ...
example.com A ...
example.com RRRSIG A ...

A is missing from the type map.

This introduces a temporary option 'reject-000-label' to control
this behaviour.

4 years agoCheck SOA without DNSKEY behaviour
Mark Andrews [Wed, 1 Dec 2021 06:03:13 +0000 (17:03 +1100)] 
Check SOA without DNSKEY behaviour

4 years agoCheck 'server { broken-nsec yes; };'
Mark Andrews [Wed, 1 Dec 2021 04:32:20 +0000 (15:32 +1100)] 
Check 'server { broken-nsec yes; };'

4 years agoAdd server christmas tree test
Mark Andrews [Wed, 1 Dec 2021 03:52:31 +0000 (14:52 +1100)] 
Add server christmas tree test

This sets as many server options as possible at once to detect
cut-and-paste bugs when implementing new server options in peer.c.
Most of the accessor functions are similar and it is easy to miss
updating a macro name or structure element name when adding new
accessor functions.

checkconf/setup.sh is there to minimise the difference to branches
with optional server options where the list is updated at runtime.

4 years agoAllow servers that emit broken NSEC records to be identified
Mark Andrews [Wed, 1 Dec 2021 03:10:47 +0000 (14:10 +1100)] 
Allow servers that emit broken NSEC records to be identified

'server <prefix> { broken-nsec yes; };' can now be used to stop
NSEC records from negative responses from servers in the given
prefix being cached and hence available to synth-from-dnssec.

4 years agoCheck that SOA and DNSKEY are consistent in NSEC typemaps
Mark Andrews [Tue, 30 Nov 2021 22:58:46 +0000 (09:58 +1100)] 
Check that SOA and DNSKEY are consistent in NSEC typemaps

If there is a SOA record present then there should also be a
DNSKEY record present as the DNSKEY is supposed to live at the
zone apex like the SOA.

4 years agoAdd data lookups into nodata tests
Mark Andrews [Mon, 29 Nov 2021 02:26:29 +0000 (13:26 +1100)] 
Add data lookups into nodata tests

4 years agoCheck synthesis of wildcard NODATA with 2 NSEC
Mark Andrews [Sat, 27 Nov 2021 22:46:01 +0000 (09:46 +1100)] 
Check synthesis of wildcard NODATA with 2 NSEC

4 years agoLook for covering NSEC under two more conditions
Mark Andrews [Sat, 27 Nov 2021 22:46:01 +0000 (09:46 +1100)] 
Look for covering NSEC under two more conditions

1) when after processing a node there where no headers that
   contained active records.

   When

       if (check_stale_header(node, header, &locktype, lock, &search,
      &header_prev);

   succeeds or

       if (EXISTS(header) && !ANCIENT(header))

   fails for all entries in the list leading to 'empty_node' remaining
   true.

   If there is are no active records we know nothing about the
   current state of the name so we treat is as ISC_R_NOTFOUND.

2) when there was a covering NOQNAME proof found or all the
   active headers where negative.

   When

if (header->noqname != NULL &&
    header->trust == dns_trust_secure)

   succeeds or

if (!NEGATIVE(header))

   never succeeds.  Under these conditions there could (should be for
   found_noqname) be a covering NSEC earlier in the tree.

4 years agoCheck synthesis of wildcard NODATA with 1 NSEC
Mark Andrews [Fri, 26 Nov 2021 23:41:38 +0000 (10:41 +1100)] 
Check synthesis of wildcard NODATA with 1 NSEC

4 years agoAdd synthesis of NODATA at wildcard
Mark Andrews [Fri, 26 Nov 2021 23:41:38 +0000 (10:41 +1100)] 
Add synthesis of NODATA at wildcard

The old code rejected NSEC that proved the wildcard name existed
(exists).  The new code rejects NSEC that prove that the wildcard
name exists and that the type exists (exists && data) but accept
NSEC that prove the wildcard name exists.

query_synthnxdomain (renamed query_synthnxdomainnodata) already
took the NSEC records and added the correct records to the message
body for NXDOMAIN or NODATA responses with the above change.  The
only additional change needed was to ensure the correct RCODE is
set.

4 years agoAdd CHANGES and release note for [GL #1265]
Mark Andrews [Fri, 22 Oct 2021 04:23:43 +0000 (15:23 +1100)] 
Add CHANGES and release note for [GL #1265]

4 years agoIgnore NSEC records without RRSIG and NSEC present
Mark Andrews [Fri, 5 Nov 2021 22:30:48 +0000 (09:30 +1100)] 
Ignore NSEC records without RRSIG and NSEC present

dns_nsec_noexistnodata now checks that RRSIG and NSEC are
present in the type map.  Both types should be present in
a correctly constructed NSEC record.  This check is in
addition to similar checks in resolver.c and validator.c.

4 years agoAdd dns_nsec_requiredtypespresent
Mark Andrews [Fri, 26 Nov 2021 22:12:08 +0000 (09:12 +1100)] 
Add dns_nsec_requiredtypespresent

checks an NSEC rdataset to ensure that both NSEC and RRSIG are
present in the type map.  These types are required for the NSEC
to be valid

4 years agoCheck 'rndc stats' output for 'cache NSEC auxiliary database nodes'
Mark Andrews [Thu, 28 Oct 2021 02:28:11 +0000 (13:28 +1100)] 
Check 'rndc stats' output for 'cache NSEC auxiliary database nodes'

4 years agoCheck synth-from-dnssec JSON counters
Mark Andrews [Thu, 28 Oct 2021 23:41:37 +0000 (10:41 +1100)] 
Check synth-from-dnssec JSON counters

4 years agoCheck synth-from-dnssec XML counters
Mark Andrews [Thu, 28 Oct 2021 22:41:31 +0000 (09:41 +1100)] 
Check synth-from-dnssec XML counters

4 years agoCheck reported synthesized responses in named.stats
Mark Andrews [Thu, 28 Oct 2021 02:18:27 +0000 (13:18 +1100)] 
Check reported synthesized responses in named.stats

4 years agoCorrect spelling of synthesized
Mark Andrews [Thu, 28 Oct 2021 02:05:33 +0000 (13:05 +1100)] 
Correct spelling of synthesized

4 years agoCheck 'rndc stats' output for 'covering nsec returned'
Mark Andrews [Thu, 28 Oct 2021 00:08:18 +0000 (11:08 +1100)] 
Check 'rndc stats' output for 'covering nsec returned'

4 years agoRecord how often DNS_R_COVERINGNSEC is returned from the cache
Mark Andrews [Wed, 27 Oct 2021 02:25:41 +0000 (13:25 +1100)] 
Record how often DNS_R_COVERINGNSEC is returned from the cache

reported as "covering nsec returned" when dumping cache stats
and as "CoveringNSEC" in json and xml cache statistics.

4 years agoRestore 'synth-from-dnssec yes;' as the default
Mark Andrews [Thu, 21 Oct 2021 05:30:35 +0000 (16:30 +1100)] 
Restore 'synth-from-dnssec yes;' as the default

4 years agoReport Cache NSEC auxilary database size
Mark Andrews [Wed, 20 Oct 2021 01:44:59 +0000 (12:44 +1100)] 
Report Cache NSEC auxilary database size

4 years agoExtend dns_db_nodecount to access auxilary rbt node counts
Mark Andrews [Wed, 20 Oct 2021 01:01:00 +0000 (12:01 +1100)] 
Extend dns_db_nodecount to access auxilary rbt node counts

dns_db_nodecount can now be used to get counts from the auxilary
rbt databases.  The existing node count is returned by
tree=dns_dbtree_main.  The nsec and nsec3 node counts by dns_dbtree_nsec
and dns_dbtree_nsec3 respectively.

4 years agoCheck Cloudflare "black lies" response
Mark Andrews [Tue, 19 Oct 2021 06:59:45 +0000 (17:59 +1100)] 
Check Cloudflare "black lies" response

"black lies" with a different QTYPE should synthesis NODATA responses.

4 years agoAllow "black lies" to be cached
Mark Andrews [Tue, 19 Oct 2021 22:22:50 +0000 (09:22 +1100)] 
Allow "black lies" to be cached

"black lies" differ from "white lies" in that the owner name of the
NSEC record matches the QNAME and the intent is to return NODATA
instead of NXDOMAIN for all types.  Caching this NSEC does not lead
to unexpected behaviour on synthesis when the QNAME matches the
NSEC owner which it does for the the general "white lie" response.

"black lie" QNAME NSEC \000.QNAME NSEC RRSIG

"white lie" QNAME- NSEC QNAME+ NSEC RRSIG

where QNAME- is a name that is close to QNAME but sorts before QNAME
and QNAME+ is a that is close to QNAME but sorts after QNAME.

Black lies are safe to cache as they don't bring into existence
names that are not intended to exist.  "Black lies" intentional change
NXDOMAIN to NODATA. "White lies" bring QNAME- into existence and named
would synthesis NODATA for QNAME+ if it is queried for that name
instead of discovering the, presumable, NXDOMAIN response.

Note rejection NSEC RRsets with NEXT names starting with the label
'\000' renders this change ineffective (see reject-000-label).

4 years agoCheck that minimal NSEC records are not cached
Mark Andrews [Tue, 19 Oct 2021 03:42:48 +0000 (14:42 +1100)] 
Check that minimal NSEC records are not cached

construct a test zone which contains a minimal NSEC record,
emit priming queries for this record, and then check that
a respose that would be synthesised from it isn't.

4 years agoDo not cache minimal NSEC records (NSEC + RRSIG only)
Mark Andrews [Tue, 19 Oct 2021 03:40:27 +0000 (14:40 +1100)] 
Do not cache minimal NSEC records (NSEC + RRSIG only)

these are not useful for dnssec synthesis as they can result in
false NODATA responses and just consume cache memory

4 years agoExtend synthfromdnssec to test with dnssec validation disabled
Mark Andrews [Mon, 18 Oct 2021 04:38:41 +0000 (15:38 +1100)] 
Extend synthfromdnssec to test with dnssec validation disabled

4 years agoExtend synthfromdnssec to check insecure responses
Mark Andrews [Mon, 18 Oct 2021 04:12:34 +0000 (15:12 +1100)] 
Extend synthfromdnssec to check insecure responses

add matching tests against a insecure zone to those which
which are synthesised.

4 years agoRemove unnecessary dns_rbt_fullnamefromnode call
Mark Andrews [Mon, 18 Oct 2021 03:05:37 +0000 (14:05 +1100)] 
Remove unnecessary dns_rbt_fullnamefromnode call

the results from dns_rbt_fullnamefromnode are not used.

4 years agoExtend checking of synthesised respones
Mark Andrews [Fri, 15 Oct 2021 06:42:45 +0000 (17:42 +1100)] 
Extend checking of synthesised respones

add digcomp checks to cover wildcard and cname wildcard case
(nxdomain and nodata already covered)

4 years agoCount DNS_R_COVERINGNSEC as a cache {query}hit
Mark Andrews [Fri, 15 Oct 2021 03:47:07 +0000 (14:47 +1100)] 
Count DNS_R_COVERINGNSEC as a cache {query}hit

Note when synthesising answer involving wildcards we look in the
cache multiple times, once for the QNAME and once for the wildcard
name which is constucted by looking at the names from the covering
NSEC return by the QNAME miss.

4 years agoAdd additional checks that upstream queries are not made
Mark Andrews [Fri, 15 Oct 2021 02:04:57 +0000 (13:04 +1100)] 
Add additional checks that upstream queries are not made

Check the named.run of authorative server that queries for the
synthesis target name are only made when expected and not when
unexpected.

4 years agoCheck synthesis of CNAME record from wildcard CNAME
Mark Andrews [Tue, 2 Nov 2021 04:26:45 +0000 (15:26 +1100)] 
Check synthesis of CNAME record from wildcard CNAME

4 years agoCheck synthesis of A record from wildcard A
Mark Andrews [Tue, 2 Nov 2021 04:16:17 +0000 (15:16 +1100)] 
Check synthesis of A record from wildcard A