Commit Graph

36600 Commits

Author SHA1 Message Date
Arаm Sаrgsyаn
cdf1871066 Merge branch 'aram/rpz-doc-update-v9_18' into 'v9_18'
[v9_18] Update RPZ documentation in ARM

See merge request isc-projects/bind9!6709
2022-08-31 08:54:04 +00:00
Aram Sargsyan
5e868be3cc Update RPZ documentation
The RPZ documentation section with response policy rules and actions
is incomplete.

Add information about the 'RPZ-CLIENT-IP' rule, and 'TCP-Only' and
'DROP' actions.

(cherry picked from commit 0fbd07ac22)
2022-08-30 10:36:14 +00:00
Mark Andrews
eb5492beeb Merge branch '3505-missing-isc_mutex_destroy-v9_18' into 'v9_18'
Call isc_mutex_destroy(&lasttime_mx); [v9_18]

See merge request isc-projects/bind9!6697
2022-08-24 07:38:01 +00:00
Mark Andrews
41cfd1c783 Call isc_mutex_destroy(&lasttime_mx);
(cherry picked from commit 8109f495c8b5d7c7f88d581f7905650add0c184e)
2022-08-24 17:03:57 +10:00
Matthijs Mekking
b88762debb Merge branch '3500-nsec3-missing-detach-node-9_18' into 'v9_18'
nsec3.c: Add a missing dns_db_detachnode() call

See merge request isc-projects/bind9!6693
2022-08-23 11:24:56 +00:00
Matthijs Mekking
d386ef9a0e Add CHANGES entry for #3500
There is no need for a release because this case was nearly impossible
to trigger (except for when 'sig-signing-type' was set to 0).

(cherry picked from commit 545ecb64b043617ea609f4f115d280bb5990e221)
2022-08-23 12:04:14 +02:00
Matthijs Mekking
e54ab3f586 nsec3.c: Add a missing dns_db_detachnode() call
There is one case in 'dns_nsec3_activex()' where it returns but forgets
to detach the db node. Add the missing 'dns_db_detachnode()' call.

This case only triggers if 'sig-signing-type' (privatetype) is set to 0
(which by default is not), or if the function is called with 'complete'
is set to 'true' (which at this moment do not exist).

(cherry picked from commit 0cf6c18ccb2205a1fc81431f908c8310f6136bbb)
2022-08-23 12:04:08 +02:00
Matthijs Mekking
9d6de16c57 Merge branch '3486-checkconf-dnssec-policy-nsec3-incompatible-algorithm-v9_18' into 'v9_18'
[v9_18]  Graceful dnssec-policy transition from NSEC only to NSEC3

See merge request isc-projects/bind9!6691
2022-08-22 17:42:11 +00:00
Matthijs Mekking
ba71f93e44 Fix nsec3 system test issues
The wait_for_zone_is_signed function was never called, which could lead
to test failures due to timing issues (where a zone was not fully signed
yet, but the test was trying to verify the zone).

Also add two missing set_nsec3param calls to ensure the ITERATIONS
value is set for these test cases.

(cherry picked from commit 08505651d1d9278314f61076ac7cd119a7790428)
2022-08-22 19:21:39 +02:00
Matthijs Mekking
ffc0c321ca Add change entry and release note for #3486
News worthy.

(cherry picked from commit 2669eb2a34ef65935f8045a6c9d271af486f38d5)
2022-08-22 19:21:39 +02:00
Matthijs Mekking
73431eef8f Add test case for #3486
Add two scenarios where we change the dnssec-policy from using RSASHA1
to something with NSEC3.

The first case should work, as the DS is still in hidden state and we
can basically do anything with DNSSEC.

The second case should fail, because the DS of the predecessor is
published and we can't immediately remove the predecessor DNSKEY. So
in this case we should keep the NSEC chain for a bit longer.

Add two more scenarios where we change the dnssec-policy from using
NSEC3 to something NSEC only. Both should work because there are no
restrictions on using NSEC when it comes to algorithms, but in the
cases where the DS is published we can't bluntly remove the predecessor.

Extend the nsec3 system test by also checking the DNSKEY RRset for the
expected DNSKEY records. This requires some "kasp system"-style setup
for each test (setting key properties and key states). Also move the
dnssec-verify check inside the check_nsec/check_nsec3 functions because
we will have to do that every time.

(cherry picked from commit 21729dd94efc9fc7b7317688dd9ff0ec45181bfd)
2022-08-22 19:21:39 +02:00
Matthijs Mekking
39c0c5022d Wait with NSEC3 during a DNSSEC policy change
When doing a dnssec-policy reconfiguration from a zone with NSEC only
keys to a zone that uses NSEC3, figure out to wait with building the
NSEC3 chain.

Previously, BIND 9 would attempt to sign such a zone, but failed to
do so because the NSEC3 chain conflicted with existing DNSKEY records
in the zone that were not compatible with NSEC3.

There exists logic for detecting such a case in the functions
dnskey_sane() (in lib/dns/zone.c) and check_dnssec() (in
lib/ns/update.c). Both functions look very similar so refactor them
to use the same code and call the new function (called
dns_zone_check_dnskey_nsec3()).

Also update the dns_nsec_nseconly() function to take an additional
parameter 'diff' that, if provided, will be checked whether an
offending NSEC only DNSKEY will be deleted from the zone. If so,
this key will not be considered when checking the zone for NSEC only
DNSKEYs. This is needed to allow a transition from an NSEC zone with
NSEC only DNSKEYs to an NSEC3 zone.

(cherry picked from commit 09a81dc84ce0fee37442f03cdbd63c2398215376)
2022-08-22 19:21:39 +02:00
Matthijs Mekking
b0ae2e4da7 Test checkconf NSEC3 and incompatible algorithm
The check code for this already exists, but was untested.

(cherry picked from commit 1996eaee547e046c8314cdb4a50a02eb9e59ce3f)
2022-08-22 16:37:38 +02:00
Arаm Sаrgsyаn
92fda68e22 Merge branch '3463-httpd.c-non-empty-post-requests-bugfix-v9_18' into 'v9_18'
[v9_18] Fix statistics channel multiple request processing with non-empty HTTP bodies

See merge request isc-projects/bind9!6689
2022-08-19 09:01:19 +00:00
Aram Sargsyan
cbb5d4f08b Add pipelined POST requests check in the statschannel system test
Use `nc` to check that multiple POST requests with non-empty HTTP
body are serviced normally by the statistics channel.

(cherry picked from commit bc32885ba981cab6308981936f49ab625af84bf2)
2022-08-19 08:27:24 +00:00
Aram Sargsyan
8e37e5f27f Replace expr commands with $((expression)) shell constucts
Update the "statschannel" system test to use the $((expression))
shell constucts instead of executing the `expr` program.

(cherry picked from commit 8034819b53789b52dd1c80b0256880b506a3f31b)
2022-08-19 08:27:17 +00:00
Aram Sargsyan
95452d9a47 Add CHANGES not for [GL #3463]
(cherry picked from commit a00d787f2cf909fe0d8dce016488916997e8d67e)
2022-08-19 08:27:09 +00:00
Aram Sargsyan
d4c5d1c650 Fix statistics channel multiple request processing with non-empty bodies
When the HTTP request has a body part after the HTTP headers, it is
not getting processed and is being prepended to the next request's data,
which results in an error when trying to parse it.

Improve the httpd.c:process_request() function with the following
additions:

1. Require that HTTP POST requests must have Content-Length header.
2. When Content-Length header is set, extract its value, and make sure
   that it is valid and that the whole request's body is received before
   processing the request.
3. Discard the request's body by consuming Content-Length worth of data
   in the buffer.

(cherry picked from commit c2bbdc8a648c9630b2c9cea5227ad5c309c2ade5)
2022-08-19 08:27:01 +00:00
Aram Sargsyan
1005dd74d9 Enhance the have_header() function to find the HTTP header's value
Add a new `const char **fvalue` parameter to the httpd.c:have_header()
function which, when set, will point to the found header's value.

(cherry picked from commit 376e698dc21f4117d6461101c4cfbaef2b724592)
2022-08-19 08:26:18 +00:00
Mark Andrews
616702ad63 Merge branch 'bug/main/delv-cfg_parser_reset-v9_18' into 'v9_18'
Reset parser before parsing of internal trust anchor [v9_18]

See merge request isc-projects/bind9!6688
2022-08-19 05:42:24 +00:00
Mark Andrews
f94e658d05 Add CHANGES entry for [GL !6468]
(cherry picked from commit 23a8c15cb2efd3486a4e7ea41c1581cb2ed07912)
2022-08-19 15:21:41 +10:00
Petr Menšík
fdd9e39dfe Reset parser before parsing of internal trust anchor
It might be reused if /etc/bind.keys exists, but failed correct parsing.
Release traces of previous parsing attempt of different data.

(cherry picked from commit dc07394c4724c1e1235af85dd8c044af70da93ae)
2022-08-19 15:21:41 +10:00
Mark Andrews
b6caedd07c Merge branch '3499-duration-c-66-6-warning-array-subscript-is-of-type-char-on-netbsd-9-v9_18' into 'v9_18'
Silence negative array index warning with toupper [v9_18]

See merge request isc-projects/bind9!6686
2022-08-19 04:30:06 +00:00
Mark Andrews
f7590c1c5a Silence negative array index warning with toupper
Cast to (unsigned char).

(cherry picked from commit d3f790340e8590ad5da1472c99d25acbc9818496)
2022-08-19 12:31:04 +10:00
Michal Nowak
8fd0b14324 Merge branch 'mnowak/freebsd-13.1-v9_18' into 'v9_18'
[v9_18] Add FreeBSD 13.1

See merge request isc-projects/bind9!6683
2022-08-18 15:57:42 +00:00
Michal Nowak
9c9f773386 Add FreeBSD 13.1
(cherry picked from commit bc425be55e1736d4f2ffada5e8d76f96b08c8351)
2022-08-18 17:30:50 +02:00
Artem Boldariev
94b129ddb7 Merge branch 'artem-dig-http-plain-get-post-support-fix-v9-18' into 'v9_18'
[Backport to 9.18] DIG: fix handling of +http-plain-get and +http-plain-post options

See merge request isc-projects/bind9!6682
2022-08-18 11:47:36 +00:00
Artem Boldariev
31435f7bc5 Modify CHANGES (+http-plain-{get, post} support fix in dig)
This commit modifies the CHANGES file to mention that +http-plain-get
and +http-plain-post options support in dig was fixed.

(cherry picked from commit 0ab40c223b524b2d65a2b67a2eb76f4d63fbfb3e)
2022-08-18 14:25:46 +03:00
Artem Boldariev
c8e551299c Modify the doth system test to verify HTTP method usage
Before the commit some checks in the system test would try to verify
that different HTTP methods can be used and are functional. However,
until recently, it was not possible to tell from the output which
method was in fact used, so it turned out that +http-plain-get option
is broken.

This commit add the additional checks to prevent that from happening
in the future.

(cherry picked from commit 625991c810b4086a5fbfc48ecb54974f6b6e3f9a)
2022-08-18 14:25:03 +03:00
Artem Boldariev
3c4d6c4ee0 DIG: mark HTTP GET method in output
This commit makes dig mark the usage of HTTP(S) GET protocol usage in
its output.

(cherry picked from commit f86d8c62b01a7ae88a3543ba85c41834e64d011a)
2022-08-18 14:24:43 +03:00
Artem Boldariev
bd033f92fd DIG: fix handling of +http-plain-{get, post} options
Support for parsing +http-plain-get and +http-plain-post options was
broken. This commit fixes that.

(cherry picked from commit fb135867644684a21d79bc3a5cebe3c83217a221)
2022-08-18 14:24:27 +03:00
Michal Nowak
b76c2ad366 Merge tag 'v9_18_6' into v9_18
BIND 9.18.6
2022-08-18 11:43:29 +02:00
Mark Andrews
f412537065 Merge branch '3494-dnssec-awk-test-is-not-precise-enough-v9_18' into 'v9_18'
Improve awk tests to prevent false negatives [v9_18]

See merge request isc-projects/bind9!6676
2022-08-18 04:40:10 +00:00
Mark Andrews
d19916bde4 Improve awk tests to prevent false negatives
The old code could incorrectly match "INSOA" in the RRSIG rdata
when looking for the SOA record.

(cherry picked from commit 2fc5f6fb2831697c79f75c50a769449ac561aad0)
2022-08-18 13:43:33 +10:00
Michal Nowak
5b04e29554 Merge branch 'mnowak/coverity-scan-2022.06-v9_18' into 'v9_18'
[v9_18] Use Coverity Scan 2022.06

See merge request isc-projects/bind9!6673
2022-08-17 14:00:38 +00:00
Michal Nowak
0955942b1f Use Coverity Scan 2022.06
(cherry picked from commit 3d683c704e271f1c8107a5b108c93db4bde7db7f)
2022-08-17 15:59:21 +02:00
Arаm Sаrgsyаn
a177b9494c Merge branch '3492-fix-tkey.c-buildquery-cleanup-v9_18' into 'v9_18'
[v9_18] Fix tkey.c:buildquery() function's error handling

See merge request isc-projects/bind9!6664
2022-08-17 09:10:38 +00:00
Aram Sargsyan
c9ac6623cc Add CHANGES note for [GL #3492]
(cherry picked from commit 8dd12db505892640d885e81dc6701607da1df67f)
2022-08-17 08:36:08 +00:00
Aram Sargsyan
b46e53a2e3 Fix tkey.c:buildquery() function's error handling
Add the missing cleanup code.

(cherry picked from commit 4237ab9550eeaea7121e3e3392fd14c26b5150f0)
2022-08-17 08:36:07 +00:00
Michal Nowak
b4ab890c71 Merge branch 'mnowak/openbsd-7.1-v9_18' into 'v9_18'
[v9_18] Add OpenBSD 7.1

See merge request isc-projects/bind9!6665
2022-08-16 15:17:14 +00:00
Michal Nowak
fdf85d8877 Add OpenBSD 7.1
(cherry picked from commit 7edf8ab47cfd0cc3a633e941b2880ee11d75d6cd)
2022-08-16 17:02:06 +02:00
Petr Špaček
000fb86614 Merge branch 'sgoldlust-edit-statements' into 'v9_18'
Edit tag/statement for glue-cache and reserved-sockets

See merge request isc-projects/bind9!6638
2022-08-15 07:22:05 +00:00
Suzanne Goldlust
cb6bf93298 Edit tag/statement for glue-cache and reserved-sockets 2022-08-15 09:17:36 +02:00
Evan Hunt
96a66e1c61 Merge branch '3488-prevent-adb-dump-race-v9_18' into 'v9_18'
Lock the address entry bucket when dumping ADB namehook

See merge request isc-projects/bind9!6657
2022-08-13 00:10:14 +00:00
Evan Hunt
f841f545b7 Lock the address entry bucket when dumping ADB namehook
When dumping an ADB address entry associated with a name,
the name bucket lock was held, but the entry bucket lock was
not; this could cause data races when other threads were updating
address entry info. (These races are probably not operationally
harmful, but they triggered TSAN error reports.)
2022-08-12 15:55:41 -07:00
Michal Nowak
1f12e1de3a Merge branch '3348-move-pkcs11-interface-test-to-debian-v9_18' into 'v9_18'
[v9_18] Move OpenSSL-based PKCS#11 interface job to Debian "bullseye"

See merge request isc-projects/bind9!6653
2022-08-11 19:18:56 +00:00
Michal Nowak
f2c0c65dca Move OpenSSL-based PKCS#11 interface job to Debian "bullseye"
Fedora 36 uses OpenSSL 3.0.2 by default, but the OpenSSL engine API
which we use for PKCS#11 is deprecated in OpenSSL 3.0.0. For the
keyfromlabel system test to work operating system with OpenSSL 1.1 needs
to be used.

(cherry picked from commit 2eecebdea91868be571e3c7a5fb3324505fbd2ff)
2022-08-11 20:31:40 +02:00
Michal Nowak
b1213d6a4d Merge branch '3458-reintroduce-without-cmocka-and-without-gssapi-v9_18' into 'v9_18'
[v9_18] Configure Ubuntu 18.04 "bionic" without cmocka and GSS-API

See merge request isc-projects/bind9!6651
2022-08-11 16:23:14 +00:00
Michal Nowak
2f1a3738f5 Configure Ubuntu 18.04 "bionic" without cmocka and GSS-API
--without-cmocka and --without-gssapi ./configure options have been lost
when Debian 9 "stretch" was dropped from the CI. This reintroduces them,
albeit to a slightly different platform.

(cherry picked from commit a2c8703967e7b6ba2a0d02ab414172588a3cb17a)
2022-08-11 17:57:46 +02:00
Michal Nowak
07b43da612 Merge branch 'mnowak/add-oracle-linux-9-v9_18' into 'v9_18'
[v9_18] Add Oracle Linux 9

See merge request isc-projects/bind9!6644
2022-08-10 12:27:20 +00:00