Commit Graph

34229 Commits

Author SHA1 Message Date
Mark Andrews
cb3c29cf8e Update the rdataset->trust field in ncache.c:rdataset_settrust
Both the trust recorded in the slab stucture and the trust on
rdataset need to be updated.

(cherry picked from commit d043a41499)
2022-04-19 09:45:16 +10:00
Mark Andrews
b5f2ab9cd4 Check that pending negative cache entries for DS can be used successfully
Prime the cache with a negative cache DS entry then make a query for
name beneath that entry. This will cause the DS entry to be retieved
as part of the validation process.  Each RRset in the ncache entry
will be validated and the trust level for each will be updated.

(cherry picked from commit d2d9910da2)
2022-04-19 09:45:16 +10:00
Matthijs Mekking
d44585fd94 Merge branch '2931-cds-delete-removed-on-signing-v9_16' into 'v9_16'
[v9_16] Don't delete CDS DELETE after zone sign

See merge request isc-projects/bind9!6127
2022-04-13 15:19:54 +00:00
Matthijs Mekking
24f9902753 Add CDS/CDNSKEY DELETE documentation
Mention in the DNSSEC guide in the "revert to unsigned" recipe that you
can publish CDS and CDNSKEY DELETE records to remove the corresponding
DS records from the parent zone.

(cherry picked from commit f088657eb1)
2022-04-13 15:13:49 +02:00
Matthijs Mekking
facf1c80a1 Add CHANGE and release note for #2931
Release note worthy.

(cherry picked from commit ebbcf4c34f)
2022-04-13 15:13:47 +02:00
Matthijs Mekking
42f43cebdd Update dns_dnssec_syncdelete() function
Update the function that synchronizes the CDS and CDNSKEY DELETE
records. It now allows for the possibility that the CDS DELETE record
is published and the CDNSKEY DELETE record is not, and vice versa.

Also update the code in zone.c how 'dns_dnssec_syncdelete()' is called.

With KASP, we still maintain the DELETE records our self. Otherwise,
we publish the CDS and CDNSKEY DELETE record only if they are added
to the zone. We do still check if these records can be signed by a KSK.

This change will allow users to add a CDS and/or CDNSKEY DELETE record
manually, without BIND removing them on the next zone sign.

Note that this commit removes the check whether the key is a KSK, this
check is redundant because this check is also made in
'dst_key_is_signing()' when the role is set to DST_BOOL_KSK.

(cherry picked from commit 3d05c99abb)
2022-04-13 15:13:12 +02:00
Matthijs Mekking
e5a5b23f41 Test CDS DELETE persists after zone sign
Add a test case for a dynamically added CDS DELETE record and make
sure it is not removed when signing the zone. This happens because
BIND maintains CDS and CDNSKEY publishing and it will only allow
CDS DELETE records if the zone is transitioning to insecure. This is
a state that can be identified when using KASP through 'dnssec-policy',
but not when using 'auto-dnssec'.

(cherry picked from commit f08277f9fb)
2022-04-13 15:13:03 +02:00
Michał Kępień
493ddc15f3 Merge branch 'michal/set-up-release-notes-for-bind-9.16.29' into 'v9_16'
Set up release notes for BIND 9.16.29

See merge request isc-projects/bind9!6120
2022-04-12 12:17:18 +00:00
Michał Kępień
0fb4b6520e Set up release notes for BIND 9.16.29 2022-04-12 14:15:41 +02:00
Michał Kępień
5c4dafe354 Merge branch 'michal/update-bind-version-to-9.16.29-dev' into 'v9_16'
Update BIND version to 9.16.29-dev

See merge request isc-projects/bind9!6116
2022-04-12 11:16:00 +00:00
Michał Kępień
5e4b940c9c Update BIND version to 9.16.29-dev 2022-04-12 13:15:31 +02:00
Michał Kępień
1c35cb1aa0 Merge branch 'michal/fix-forward-system-test-requirements-v9_16' into 'v9_16'
[v9_16] Fix "forward" system test requirements

See merge request isc-projects/bind9!6112
2022-04-11 13:33:16 +00:00
Michał Kępień
55f2457526 Fix "forward" system test requirements
Commit 59d1eb3ff8 added a Python-based
name server (bin/tests/system/forward/ans11/ans.py) to the "forward"
system test, but did not update the bin/tests/system/forward/prereq.sh
script to ensure Python is present in the test environment before the
"forward" system test is run.  Update bin/tests/system/forward/prereq.sh
to enforce that requirement.
2022-04-11 14:40:20 +02:00
Petr Špaček
7ee090be53 Merge branch '2950-cache-acceptance-rules-test-v9_16' into 'v9_16'
[CVE-2021-25220] Add tests for forwarder cache poisoning scenarios [v9_16]

See merge request isc-projects/bind9!6106
2022-04-08 08:13:15 +00:00
Mark Andrews
59d1eb3ff8 Add tests for forwarder cache poisoning scenarios
- Check that an NS in an authority section returned from a forwarder
  which is above the name in a configured "forward first" or "forward
  only" zone (i.e., net/NS in a response from a forwarder configured for
  local.net) is not cached.
- Test that a DNAME for a parent domain will not be cached when sent
  in a response from a forwarder configured to answer for a child.
- Check that glue is rejected if its name falls below that of zone
  configured locally.
- Check that an extra out-of-bailiwick data in the answer section is
  not cached (this was already working correctly, but was not explicitly
  tested before).

(cherry picked from commit bf3fffff67)
2022-04-08 10:12:24 +02:00
Michal Nowak
cc0954631d Merge branch '3112-test-lingering-tcp-sockets-in-closewait-v9_16' into 'v9_16'
[v9_16] Add system test lingering CLOSE_WAIT TCP sockets

See merge request isc-projects/bind9!6104
2022-04-08 08:03:14 +00:00
Ondřej Surý
260e0ceaf5 Add system test **/named.* modifier files to .reuse/dep5
There's couple of files that modify behaviour of named when started via
bin/tests/system/start.pl.  Add those files as CC-1.0 to .reuse/dep5 as
they are just empty placeholders.

(cherry picked from commit b6eb31a0e3)
2022-04-08 09:36:08 +02:00
Matthijs Mekking
a8313a6c3c Add system test lingering CLOSE_WAIT TCP sockets
Add a test case to check for lingering TCP sockets stuck in the
CLOSE_WAIT state. This can happen if a client sends some garbage after
its first query.

The system test runs the reproducer script and then sends another TCP
query to the resolver. The resolver is configured to allow one TCP
client only. If BIND has its TCP socket stuck in CLOSE_WAIT, it does
not have the resources available to answer the second query.

Note: A better test would be to check if the named daemon does not
have a TCP socket stuck in CLOSE_WAIT for example with netstat. When
running this test locally you can examine named with netstat manually.
But since netstat is platform specific it is not a good candidate to do
this as a system test.

If you, if you could return, don't let it burn.
Do you have to let it linger?
- Cranberries

(cherry picked from commit b9ebde705b)
2022-04-08 09:36:08 +02:00
Petr Špaček
237d88fe22 Allow py.test system test to skip itself
Enable use of shortcuts like pytest.importorskip and other tricks
which can cause test to skip itself.

(cherry picked from commit b8829c801f)

In addition to b8829c801f,
"R:$systest:SKIPPED" is not being printed when pytests are skipped
because that leads to two `R:` lines - SKIPPED and PASS/FAIL which is
determined later based on other conditions (core files identified,
assertion failures, shell test result, ...) - which is wrong and
testsummary.sh rightfully stumbles on it:

    I:Found 106 test results, but 105 tests were run
2022-04-08 09:20:55 +02:00
Petr Špaček
7cffcce36f Merge branch 'pspacek/manpage-hyperlinks-v9_16' into 'v9_16'
Backport helpers for hyperlinks in manual pages [v9_16]

See merge request isc-projects/bind9!6086
2022-04-07 14:14:07 +00:00
Petr Špaček
148f6f20e7 Ignore :option: references in rst files to to simplify doc backports
Override Sphinx built-in :option: to act and render as `` literal.
This avoids problems with undefined :option:`target`s when merging
doc backports.
2022-04-07 15:46:55 +02:00
Petr Špaček
c9a512247d Introduce new Sphinx role iscman for ISC manual pages
The new directive and role "iscman" allow to tag & reference man pages in
our source tree. Essentially it is just namespacing for ISC man pages,
but it comes with couple benefits.

Differences from .. _man_program label we formerly used:
- Does not expand :ref:`man_program` into full text of the page header.
- Generates index entry with category "manual page".
- Rendering style is closer to ubiquitous to the one produced
  by ``named`` syntax.

Differences from Sphinx built-in :manpage: role:
- Supports all builders with support for cross-references.
- Generates internal links (unlike :manpage: which generates external
  URLs).
- Checks that target exists withing our source tree.

(cherry-picked from commit 7e7a946d44)
2022-04-07 15:46:52 +02:00
Michał Kępień
ecc6ec0754 Merge branch '3208-add-CHANGES-entry-v9_16' into 'v9_16'
[v9_16] Add CHANGES entry for GL #3208

See merge request isc-projects/bind9!6101
2022-04-07 13:08:10 +00:00
Michał Kępień
197e8989c9 Add CHANGES entry for GL #3208
(cherry picked from commit 059a602551)
2022-04-07 15:04:51 +02:00
Ondřej Surý
47eaecf69f Merge branch '3249-rename-configuration-option-to-reuseport-v9_16' into 'v9_16'
Rename the configuration option to load balance sockets to reuseport [v9.16]

See merge request isc-projects/bind9!6095
2022-04-06 16:07:52 +00:00
Ondřej Surý
a7f893e836 Rename the configuration option to load balance sockets to reuseport
After some back and forth, it was decidede to match the configuration
option with unbound ("so-reuseport"), PowerDNS ("reuseport") and/or
nginx ("reuseport").

(cherry picked from commit 7e71c4d0cc)
2022-04-06 17:51:12 +02:00
Ondřej Surý
f943504b03 Merge branch '3190-offload-rpz-updates-revert-v9_16' into 'v9_16'
Revert "Run the RPZ update as offloaded work" [v9.16]

See merge request isc-projects/bind9!6092
2022-04-06 11:43:57 +00:00
Ondřej Surý
daa7d6d6db Revert "General cleanup of dns_rpz implementation"
This reverts commit 84e62cece5.
2022-04-06 10:41:49 +02:00
Ondřej Surý
f5fbe2c26f Revert "Refactor the dns_rpz_add/delete to use local rpz copy"
This reverts commit 635147d01a.
2022-04-06 10:41:39 +02:00
Ondřej Surý
b68ccdc48e Revert "Run the RPZ update as offloaded work"
This reverts commit 73a0bb8588.
2022-04-06 10:31:23 +02:00
Ondřej Surý
be936a10b0 Revert "Add CHANGES and release note for [GL #3190]"
This reverts commit 639e0600f0.
2022-04-06 10:31:21 +02:00
Ondřej Surý
d346d188ae Merge branch '3249-fix-windows-sockets-v9_16' into 'v9_16'
Fix the Windows code paths modified for load balanced sockets

See merge request isc-projects/bind9!6083
2022-04-05 14:35:22 +00:00
Ondřej Surý
d836f23f79 Fix the Windows paths modified for load balanced sockets
When backporting the load balanced sockets to BIND 9.16, the Windows
specific paths were missed.  Add the #if(n)def _WIN32 back into the
appropriate places.
2022-04-05 11:53:18 +02:00
Ondřej Surý
93d61ae5d2 Merge branch '3249-add-configuration-option-to-disable-SO_REUSEPORT_LB-fix-v9_16' into 'v9_16'
Enable the load-balance-sockets configuration [v9.16]

See merge request isc-projects/bind9!6079
2022-04-05 00:35:17 +00:00
Ondřej Surý
5f27873d01 Rename shutdown() to test_shutdown() in timer_test.c
The shutdown() is part of standard library (POSIX-1), don't use such
name in the timer_test.c, but rather rename it to test_shutdown().
2022-04-05 02:17:47 +02:00
Ondřej Surý
9159837315 Enable the load-balance-sockets configuration
Previously, HAVE_SO_REUSEPORT_LB has been defined only in the private
netmgr-int.h header file, making the configuration of load balanced
sockets inoperable.

Move the missing HAVE_SO_REUSEPORT_LB define the isc/netmgr.h and add
missing isc_nm_getloadbalancesockets() implementation.

(cherry picked from commit 142c63dda8)
2022-04-05 02:17:47 +02:00
Ondřej Surý
8f16a25522 Merge branch '3249-add-configuration-option-to-disable-SO_REUSEPORT_LB-v9_16' into 'v9_16'
Add option to configure load balance sockets [v9.16]

See merge request isc-projects/bind9!6075
2022-04-04 23:52:46 +00:00
Ondřej Surý
4026c3559b Add CHANGES and release note for [GL #3249]
(cherry picked from commit 855f49cfba)
2022-04-05 01:21:50 +02:00
Ondřej Surý
8993ebc01a Add option to configure load balance sockets
Previously, the option to enable kernel load balancing of the sockets
was always enabled when supported by the operating system (SO_REUSEPORT
on Linux and SO_REUSEPORT_LB on FreeBSD).

It was reported that in scenarios where the networking threads are also
responsible for processing long-running tasks (like RPZ processing, CATZ
processing or large zone transfers), this could lead to intermitten
brownouts for some clients, because the thread assigned by the operating
system might be busy.  In such scenarious, the overall performance would
be better served by threads competing over the sockets because the idle
threads can pick up the incoming traffic.

Add new configuration option (`load-balance-sockets`) to allow enabling
or disabling the load balancing of the sockets.

(cherry picked from commit 85c6e797aa)
2022-04-05 01:21:50 +02:00
Ondřej Surý
cd9dd70594 Merge branch '3190-offload-rpz-updates-v9_16' into 'v9_16'
Run the RPZ update as offloaded work [v9.16]

See merge request isc-projects/bind9!6074
2022-04-04 22:53:55 +00:00
Ondřej Surý
639e0600f0 Add CHANGES and release note for [GL #3190]
(cherry picked from commit 23a4559b34)
(cherry picked from commit f3ae14d8c3)
2022-04-05 00:30:39 +02:00
Ondřej Surý
73a0bb8588 Run the RPZ update as offloaded work
Previously, the RPZ updates ran quantized on the main nm_worker loops.
As the quantum was set to 1024, this might lead to service
interruptions when large RPZ update was processed.

Change the RPZ update process to run as the offloaded work.  The update
and cleanup loops were refactored to do as little locking of the
maintenance lock as possible for the shortest periods of time and the db
iterator is being paused for every iteration, so we don't hold the rbtdb
tree lock for prolonged periods of time.

(cherry picked from commit f106d0ed2b)
(cherry picked from commit e128b6a951)
2022-04-05 00:30:39 +02:00
Ondřej Surý
635147d01a Refactor the dns_rpz_add/delete to use local rpz copy
Previously dns_rpz_add() were passed dns_rpz_zones_t and index to .zones
array.  Because we actually attach to dns_rpz_zone_t, we should be using
the local pointer instead of passing the index and "finding" the
dns_rpz_zone_t again.

Additionally, dns_rpz_add() and dns_rpz_delete() were used only inside
rpz.c, so make them static.

(cherry picked from commit b6e885c97f)
(cherry picked from commit f4cba0784e)
2022-04-05 00:30:39 +02:00
Ondřej Surý
84e62cece5 General cleanup of dns_rpz implementation
Do a general cleanup of lib/dns/rpz.c style:

 * Removed deprecated and unused functions
 * Unified dns_rpz_zone_t naming to rpz
 * Unified dns_rpz_zones_t naming to rpzs
 * Add and use rpz_attach() and rpz_attach_rpzs() functions
 * Shuffled variables to be more local (cppcheck cleanup)

(cherry picked from commit 840179a247)
(cherry picked from commit bfee462403)
2022-04-05 00:02:35 +02:00
Tony Finch
ae34c574bb Merge branch 'fanf/macos-ifconfig-v9_16' into 'v9_16'
MacOS needs more IP addresses to run the system tests (backport to 9.16)

See merge request isc-projects/bind9!6070
2022-04-04 14:29:21 +00:00
Tony Finch
3f4a63332a MacOS needs more IP addresses to run the system tests
The launchd script only counted up to 8 whereas ifconfig.sh went all
the way up to 10, and even a bit further than that.

(cherry picked from commit 29a3e77425)
2022-04-04 15:08:45 +01:00
Mark Andrews
e9ff292be3 Merge branch '3191-issue-45178-in-oss-fuzz-bind9-dns_master_load_fuzzer-integer-overflow-in-generate-v9_16' into 'v9_16'
Prevent arithmetic overflow of 'i' in master.c:generate

See merge request isc-projects/bind9!6056
2022-04-01 22:24:11 +00:00
Evan Hunt
975a3da84e add a system test for $GENERATE with an integer overflow
the line "$GENERATE 19-28/2147483645 $ CNAME x" should generate
a single CNAME with the owner "19.example.com", but prior to the
overflow bug it generated several CNAMEs, half of them with large
negative values.

we now test for the bugfix by using "named-checkzone -D" and
grepping for a single CNAME in the output.

(cherry picked from commit bd814b79d4)
2022-04-01 21:47:24 +11:00
Evan Hunt
fc7ed00d70 update shell syntax
clean up the shell syntax in the checkzone test prior to adding
a new test.

(cherry picked from commit 2261c853b5)
2022-04-01 21:46:33 +11:00
Mark Andrews
f06c446ae8 Add test case for issue-45178
(cherry picked from commit 9039aad0f8)
2022-04-01 21:42:53 +11:00