2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 15:05:23 +00:00
Commit Graph

33919 Commits

Author SHA1 Message Date
Artem Boldariev
1a298b28e2 Merge branch 'artem/doh-quota-tests' into 'main'
Add DoH quota tests

See merge request isc-projects/bind9!5024
2021-05-19 08:30:17 +00:00
Artem Boldariev
67c50abe5a Add DoH quota tests
This commit adds unit tests which ensure that DoH code is compatible
with quota functionality.
2021-05-19 10:28:47 +03:00
Mark Andrews
c2c2b0da9a Merge branch '2688-cid331478-forwardnull' into 'main'
Fix possible null dereference (coverity issue 331478)

Closes #2688

See merge request isc-projects/bind9!5034
2021-05-19 01:55:53 +00:00
Matthijs Mekking
19395fd168 Fix coverity issue 331478
Move the "cannot start rollover" warning into code block that checks
if 'active_key' is not NULL.
2021-05-19 00:45:54 +00:00
Mark Andrews
954eb15052 Merge branch '2550-remove-dns_zone_setflag' into 'main'
Resolve "Remove dns_zone_setflag"

Closes #2550

See merge request isc-projects/bind9!4762
2021-05-18 23:54:35 +00:00
Mark Andrews
314b5362a8 Remove dns_zone_setflag()
This function has never been used since it was added to the source tree
by commit 686b27bfd3 back in 1999.  As
the dns_zoneflg_t type is only defined in lib/dns/zone.c, no function
external to that file would be able to use dns_zone_setflag() properly
anyway - the DNS_ZONE_SETFLAG() and DNS_ZONE_CLRFLAG() macros should be
used instead. Zone options that can be set from outside zone.c are set
using dns_zone_setoption().
2021-05-18 16:02:18 -07:00
Matthijs Mekking
b6f806e023 Merge branch '2463-kasp-views-different-policy-same-keydirectory' into 'main'
Check key-directory duplicates for kasp zones

Closes #2463

See merge request isc-projects/bind9!4989
2021-05-18 14:40:26 +00:00
Matthijs Mekking
a9f4b074c4 Release notes and changes for [GL #2463]
Mention the bugfix.
2021-05-18 15:47:02 +02:00
Matthijs Mekking
df1aecd5ff Add checkconf tests for [#2463]
Add two tests to make sure named-checkconf catches key-directory issues
where a zone in multiple views uses the same directory but has
different dnssec-policies. One test sets the key-directory specifically,
the other inherits the default key-directory (NULL, aka the working
directory).

Also update the good.conf test to allow zones in different views
with the same key-directory if they use the same dnssec-policy.

Also allow zones in different views with different key-directories if
they use different dnssec-policies.

Also allow zones in different views with the same key-directories if
only one view uses a dnssec-policy (the other is set to "none").

Also allow zones in different views with the same key-directories if
no views uses a dnssec-policy (zone in both views has the dnssec-policy
set to "none").
2021-05-18 15:47:02 +02:00
Matthijs Mekking
494e8b2cbd Check key-directory duplicates for kasp zones
Don't allow the same zone with different dnssec-policies in separate
views have the same key-directory.

Track zones plus key-directory in a symtab and if there is a match,
check the offending zone's dnssec-policy name. If the name is "none"
(there is no kasp for the offending zone), or if the name is the same
(the zone shares keys), it is fine, otherwise it is an error (zones
in views using different policies cannot share the same key-directory).
2021-05-18 15:47:02 +02:00
Mark Andrews
8a90139c2c Merge branch '2696-misleading-diagnostic-in-update_soa_serial-indicates-bind-will-use-increment-but-it-doesn-t' into 'main'
Resolve "Misleading diagnostic in update_soa_serial indicates BIND will use increment but it doesn't"

Closes #2696

See merge request isc-projects/bind9!5029
2021-05-18 12:51:00 +00:00
Mark Andrews
5d21042ed8 Adjust returned method from dns_updatemethod_date
if dns_updatemethod_date is used do that the returned method is only
set to dns_updatemethod_increment if the new serial does not encode
the current day (YYYYMMDDXX).
2021-05-18 12:30:22 +00:00
Michał Kępień
3dc094c8e0 Merge branch 'michal/use-context-managers-as-suggested-by-pylint-2.8.2' into 'main'
Use context managers as suggested by PyLint 2.8.2

See merge request isc-projects/bind9!5041
2021-05-18 08:56:50 +00:00
Michał Kępień
a8163551ed Use context managers as suggested by PyLint 2.8.2
PyLint 2.8.2 reports the following suggestions for two Python scripts
used in the system test suite:

    ************* Module tests_rndc_deadlock
    bin/tests/system/addzone/tests_rndc_deadlock.py:71:4: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
    ************* Module tests-shutdown
    bin/tests/system/shutdown/tests-shutdown.py:68:4: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
    bin/tests/system/shutdown/tests-shutdown.py:154:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

Implement the above suggestions by using
concurrent.futures.ThreadPoolExecutor() and subprocess.Popen() as
context managers.
2021-05-18 10:53:17 +02:00
Mark Andrews
71284cb496 Merge branch '2706-worker-cond_prio-needs-to-be-initialised' into 'main'
Resolve "worker->cond_prio needs to be initialised"

Closes #2706

See merge request isc-projects/bind9!5048
2021-05-18 08:39:28 +00:00
Mark Andrews
7e83c6df94 initialise worker->cond_prio 2021-05-18 07:47:42 +00:00
Mark Andrews
cdb8c9bd35 Merge branch '2701-gcc-10-fanalyzer-reports-dereference-of-null-label-in-lib-dns-name-c-1167' into 'main'
Resolve "gcc-10+ -fanalyzer reports: dereference of NULL ‘label’ in lib/dns/name.c:1167"

Closes #2701

See merge request isc-projects/bind9!5046
2021-05-18 06:41:56 +00:00
Mark Andrews
29f1c1e677 Silence gcc-10-fanalyzer false positive
If 'state == ft_ordinary' then 'label' can't be NULL. Add
INSIST to reflect this.
2021-05-18 15:51:51 +10:00
Mark Andrews
ea305a4877 Merge branch '2702-gcc-10-fanalyzer-reports' into 'main'
Resolve "gcc-10+ -fanalyzer reports:"

Closes #2702

See merge request isc-projects/bind9!5043
2021-05-18 05:45:26 +00:00
Mark Andrews
683ad6e4bd Silence gcc-10-fanalyzer false positive
Add REQUIRE(type == dns_rdatatype_nsec3 || firstp != NULL); so
that dereferences of *firstp is not flagged as a NULL pointer
dereference.
2021-05-18 15:19:28 +10:00
Mark Andrews
3b0d6450db Merge branch '2689-cid-331477-resource-leaks-resource_leak' into 'main'
Resolve "CID 331477: Resource leaks (RESOURCE_LEAK)"

Closes #2689

See merge request isc-projects/bind9!5016
2021-05-18 00:53:38 +00:00
Mark Andrews
d24ea068c8 Add CHANGES for [GL #2689] 2021-05-18 10:34:10 +10:00
Mark Andrews
8eed392add Address potential resource leak in dst_key_fromnamedfile 2021-05-18 10:33:43 +10:00
Evan Hunt
27386db7fe Merge branch 'each-bufsize-doc' into 'main'
clarify buffer size options

See merge request isc-projects/bind9!5037
2021-05-17 17:02:18 +00:00
Evan Hunt
05985f6889 clarify buffer size options
the documentation for {udp,tcp}-{send,receive}-buffer options
was not complete. also revised for grammar.
2021-05-17 09:34:08 -07:00
Michał Kępień
e3b442e538 Merge branch 'michal/tweak-cve-handling-checklists' into 'main'
Tweak security incident handling checklists

See merge request isc-projects/bind9!5017
2021-05-17 12:09:44 +00:00
Michał Kępień
ba1145c017 Tweak security incident handling checklists
Add an item to the CVE issue template which calls for drafting the
security advisory early in the security incident handling process.  The
intention is to ensure there is enough time to review and polish ISC
security advisories before they get published.

Tweak the release checklist to make sure we carefully consider all
confidential issues before opening them up to the public.  This change
is intended as a safeguard against accidentally disclosing too much
information about a security vulnerability before our users get a chance
to patch it.
2021-05-17 14:07:27 +02:00
Ondřej Surý
f2b297a37d Merge branch 'ondrej/remove-netmgr-quantum' into 'main'
Replace netmgr quantum with loop-preventing barrier

See merge request isc-projects/bind9!5028
2021-05-17 10:05:11 +00:00
Ondřej Surý
9e3cb396b2 Replace netmgr quantum with loop-preventing barrier
Instead of using fixed quantum, this commit adds atomic counter for
number of items on each queue and uses the number of netievents
scheduled to run as the limit of maximum number of netievents for a
single process_queue() run.

This prevents the endless loops when the netievent would schedule more
netievents onto the same loop, but we don't have to pick "magic" number
for the quantum.
2021-05-17 11:59:19 +02:00
Michal Nowak
9e21b80cbd Merge branch '2693-add-py-test-to-the-list-of-tested-pytest-names' into 'main'
Add py.test to the list of tested pytest names

Closes #2693

See merge request isc-projects/bind9!5022
2021-05-17 09:23:25 +00:00
Michal Nowak
510b4b70e9 Add py.test to the list of tested pytest names
OpenBSD changed the name of the pytest script from py.test-3 in OpenBSD
6.8 to py.test in OpenBSD 6.9.

The py.test-3 name which was added in d5562a3e for the sake of OpenBSD
and CentOS is still required for CentOS.
2021-05-17 11:12:43 +02:00
Ondřej Surý
d34672796c Merge branch '2313-set-RCVBUF-SNDBUF' into 'main'
Resolve "Set reasonable values to SO_RCVBUF and SO_SNDBUF"

Closes #2313

See merge request isc-projects/bind9!4460
2021-05-17 07:42:37 +00:00
Ondřej Surý
3733b4f101 Add CHANGES and release note for GL #2313 2021-05-17 08:47:09 +02:00
Ondřej Surý
4509089419 Add configuration option to set send/recv buffers on the nm sockets
This commit adds a new configuration option to set the receive and send
buffer sizes on the TCP and UDP netmgr sockets.  The default is `0`
which doesn't set any value and just uses the value set by the operating
system.

There's no magic value here - set it too small and the performance will
drop, set it too large, the buffers can fill-up with queries that have
already timeouted on the client side and nobody is interested for the
answer and this would just make the server clog up even more by making
it produce useless work.

The `netstat -su` can be used on POSIX systems to monitor the receive
and send buffer errors.
2021-05-17 08:47:09 +02:00
Michal Nowak
089bfe20f9 Merge branch '2386-check-correct-copyright-dates-in-man-pages' into 'main'
Set copyright year to the current year

Closes #2386

See merge request isc-projects/bind9!4869
2021-05-14 12:46:33 +00:00
Michal Nowak
7eb44b05c5 Set copyright year to the current year
To ensure that a release with outdated copyright year is not produced at
the beginning of a year, set copyright year to the current year.
2021-05-14 14:21:58 +02:00
Michal Nowak
6f9ac0e997 Merge branch 'mnowak/add-unit-gcc-out-of-tree-ci-job' into 'main'
Add unit:gcc:out-of-tree CI job

See merge request isc-projects/bind9!4740
2021-05-14 12:21:06 +00:00
Michal Nowak
741fdd4fe1 Add unit:gcc:out-of-tree CI job
Also extract the workspace save-and-retrieve logic to YAML anchors.
2021-05-14 13:22:09 +02:00
Michal Nowak
c628f2c71b Make masterXX.data.in reachable by out-of-tree builds
Unit test run for out-of-tree builds used to fail to find
masterXX.data.in files:

    /usr/bin/perl -w /builds/mnowak/bind9/lib/dns/tests/mkraw.pl < testdata/master/master12.data.in > testdata/master/master12.data
    /bin/bash: testdata/master/master12.data.in: No such file or directory
    make[4]: *** [Makefile:1910: testdata/master/master12.data] Error 1
2021-05-14 13:22:09 +02:00
Ondřej Surý
1c5de1aa43 Merge branch 'ondrej/fix-outgoing-udp-socket-selection-on-windows' into 'main'
Fix the outgoing UDP socket selection on Windows

See merge request isc-projects/bind9!5021
2021-05-13 14:05:22 +00:00
Ondřej Surý
cd413234f7 Fix the outgoing UDP socket selection on Windows
The outgoing UDP socket selection would pick unintialized children
socket on Windows, because we have more netmgr workers than we have
listening sockets.  This commit fixes the selection by keeping the
outgoing socket the same, so it's always run on existing socket.
2021-05-13 15:04:48 +02:00
Artem Boldariev
d7689d8dbc Merge branch 'artem-flamethrower-fixes' into 'main'
DoH flamethrower fixes

See merge request isc-projects/bind9!5019
2021-05-13 10:01:26 +00:00
Artem Boldariev
bab9309231 Fix DoH unit tests logic
This commit fixes logic bugs in DoH test suite revealed by making DoH
not to call nghttp2_session_terminate_session() in server-side code.
2021-05-13 10:42:25 +03:00
Artem Boldariev
6816a741ca Fix crash in TLS caused by improper handling of shutdown messages
The problem was found when flamethrower was accidentally run in DoT
mode against DoH port.
2021-05-13 10:42:25 +03:00
Artem Boldariev
1947f6372d Limit the number of active concurrent HTTP/2 streams
The initial intent was to limit the number of concurrent streams by
the value of 100 but due to the error when reading the documentation
it was set to the maximum possible number of streams per session.

This could lead to security issues, e.g. a remote attacker could have
taken down the BIND instance by creating lots of sessions via low
number of transport connections. This commit fixes that.
2021-05-13 10:42:25 +03:00
Artem Boldariev
d80d1b0dd9 Do not allow empty DoH endpoints to be added
It was possible to specify empty DoH endpoint in BIND's configuration
file: that was an error, we should not allow doing so.
2021-05-13 10:42:25 +03:00
Artem Boldariev
9155a87528 Do not call nghttp2_session_terminate_session() in server-side code
We should not call nghttp2_session_terminate_session() in server-side
code after all of the active HTTP/2 streams are processed. The
underlying transport connection is expected to remain opened at least
for some time in this case for new HTTP/2 requests to arrive. That is
what flamethrower was expecting and it makes perfect sense from the
HTTP/2 perspective.
2021-05-13 10:42:25 +03:00
Mark Andrews
4d888458ab Merge branch '2528-check-soa-rdata' into 'main'
Check SOA rdata for consistency in AXFR.

Closes #2528

See merge request isc-projects/bind9!5014
2021-05-13 05:17:39 +00:00
Evan Hunt
4d94f82232 system test
Attempt a zone transfer with mismatched SOA records.
2021-05-13 03:36:50 +00:00
Mark Andrews
7e54d8d2cb Add CHANGES entry for [GL #2528] 2021-05-13 03:36:50 +00:00