]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
16 months agoUpdate BIND version for release 216585 v9.18.33
Nicki Křížek [Mon, 20 Jan 2025 13:35:25 +0000 (14:35 +0100)] 
Update BIND version for release

16 months agonew: doc: Prepare documentation for BIND 9.18.33
Nicki Křížek [Mon, 20 Jan 2025 13:32:58 +0000 (13:32 +0000)] 
new: doc: Prepare documentation for BIND 9.18.33

Merge branch 'andoni/prepare-documentation-for-bind-9.18.33' into 'v9.18.33-release'

See merge request isc-private/bind9!774

16 months agoTweak and reword release notes
Andoni Duarte Pintado [Thu, 16 Jan 2025 15:43:14 +0000 (16:43 +0100)] 
Tweak and reword release notes

16 months agoFix broken option reference in the ARM
Andoni Duarte Pintado [Thu, 16 Jan 2025 09:41:20 +0000 (10:41 +0100)] 
Fix broken option reference in the ARM

16 months agoPrepare release notes for BIND 9.18.33
Andoni Duarte Pintado [Thu, 16 Jan 2025 15:39:21 +0000 (16:39 +0100)] 
Prepare release notes for BIND 9.18.33

16 months agoGenerate changelog for BIND 9.18.33
Andoni Duarte Pintado [Thu, 16 Jan 2025 15:38:10 +0000 (16:38 +0100)] 
Generate changelog for BIND 9.18.33

16 months ago[9.18] [CVE-2024-12705] sec: usr: DNS-over-HTTP(s) flooding fixes
Andoni Duarte [Wed, 15 Jan 2025 16:03:28 +0000 (16:03 +0000)] 
[9.18] [CVE-2024-12705] sec: usr: DNS-over-HTTP(s) flooding fixes

Fix DNS-over-HTTP(S) implementation issues that arise under heavy
query load. Optimize resource usage for :iscman:`named` instances
that accept queries over DNS-over-HTTP(S).

Previously, :iscman:`named` would process all incoming HTTP/2 data
at once, which could overwhelm the server, especially when dealing
with clients that send requests but don't wait for responses. That
has been fixed. Now, :iscman:`named` handles HTTP/2 data in smaller
chunks and throttles reading until the remote side reads the
response data. It also throttles clients that send too many requests
at once.

Additionally, :iscman:`named` now carefully processes data sent by
some clients, which can be considered "flooding." It logs these
clients and drops connections from them.
:gl:`#4795`

In some cases, :iscman:`named` could leave DNS-over-HTTP(S)
connections in the `CLOSE_WAIT` state indefinitely. That also has
been fixed. ISC would like to thank JF Billaud for thoroughly
investigating the issue and verifying the fix.
:gl:`#5083`

See https://gitlab.isc.org/isc-projects/bind9/-/issues/4795

Closes https://gitlab.isc.org/isc-projects/bind9/-/issues/5083

Backport of !732.

Merge branch 'artem-improve-doh-resource-usage-9.18' into 'v9.18.33-release'

See merge request isc-private/bind9!763

16 months agoDoH: reduce excessive bad request logging
Artem Boldariev [Thu, 18 Jul 2024 17:21:53 +0000 (20:21 +0300)] 
DoH: reduce excessive bad request logging

We started using isc_nm_bad_request() more actively throughout
codebase. In the case of HTTP/2 it can lead to a large count of
useless "Bad Request" messages in the BIND log, as often we attempt to
send such request over effectively finished HTTP/2 sessions.

This commit fixes that.

(cherry picked from commit 937b5f8349a6a5e15af254a53a659e39c7c1d179)

16 months agoDoH: introduce manual read timer control
Artem Boldariev [Tue, 9 Jul 2024 20:23:11 +0000 (23:23 +0300)] 
DoH: introduce manual read timer control

This commit introduces manual read timer control as used by StreamDNS
and its underlying transports. Before that, DoH code would rely on the
timer control provided by TCP, which would reset the timer any time
some data arrived. Now, the timer is restarted only when a full DNS
message is processed in line with other DNS transports.

That change is required because we should not stop the timer when
reading from the network is paused due to throttling. We need a way to
drop timed-out clients, particularly those who refuse to read the data
we send.

(cherry picked from commit 609a41517b1631c320876a41c43c68c9a0ee0f9f)

16 months agoDoH: floodding clients detection
Artem Boldariev [Mon, 8 Jul 2024 20:27:29 +0000 (23:27 +0300)] 
DoH: floodding clients detection

This commit adds logic to make code better protected against clients
that send valid HTTP/2 data that is useless from a DNS server
perspective.

Firstly, it adds logic that protects against clients who send too
little useful (=DNS) data. We achieve that by adding a check that
eventually detects such clients with a nonfavorable useful to
processed data ratio after the initial grace period. The grace period
is limited to processing 128 KiB of data, which should be enough for
sending the largest possible DNS message in a GET request and then
some. This is the main safety belt that would detect even flooding
clients that initially behave well in order to fool the checks server.

Secondly, in addition to the above, we introduce additional checks to
detect outright misbehaving clients earlier:

The code will treat clients that open too many streams (50) without
sending any data for processing as flooding ones; The clients that
managed to send 1.5 KiB of data without opening a single stream or
submitting at least some DNS data will be treated as flooding ones.
Of course, the behaviour described above is nothing else but
heuristical checks, so they can never be perfect. At the same time,
they should be reasonable enough not to drop any valid clients,
realatively easy to implement, and have negligible computational
overhead.

(cherry picked from commit 3425e4b1d04746520931e93ac7ef5979fd6b54fd)

16 months agoDoH: process data chunk by chunk instead of all at once
Artem Boldariev [Thu, 4 Jul 2024 11:58:10 +0000 (14:58 +0300)] 
DoH: process data chunk by chunk instead of all at once

Initially, our DNS-over-HTTP(S) implementation would try to process as
much incoming data from the network as possible. However, that might
be undesirable as we might create too many streams (each effectively
backed by a ns_client_t object). That is too forgiving as it might
overwhelm the server and trash its memory allocator, causing high CPU
and memory usage.

Instead of doing that, we resort to processing incoming data using a
chunk-by-chunk processing strategy. That is, we split data into small
chunks (currently 256 bytes) and process each of them
asynchronously. However, we can process more than one chunk at
once (up to 4 currently), given that the number of HTTP/2 streams has
not increased while processing a chunk.

That alone is not enough, though. In addition to the above, we should
limit the number of active streams: these streams for which we have
received a request and started processing it (the ones for which a
read callback was called), as it is perfectly fine to have more opened
streams than active ones. In the case we have reached or surpassed the
limit of active streams, we stop reading AND processing the data from
the remote peer. The number of active streams is effectively decreased
only when responses associated with the active streams are sent to the
remote peer.

Overall, this strategy is very similar to the one used for other
stream-based DNS transports like TCP and TLS.

(cherry picked from commit 9846f395ad79bb50a5fa5ca6ab97ef904b3be35a)

16 months agoAdd isc__nm_async_run()
Artem Boldariev [Fri, 6 Sep 2024 14:28:58 +0000 (17:28 +0300)] 
Add isc__nm_async_run()

This commit adds isc__nm_async_run() which is very similar to
isc_async_run() in newer versions of BIND: it allows calling a
callback asynchronously.

Potentially, it can be used to replace some other async operations in
other networking code, in particular the delayed I/O calls in TLS a
TCP DNS transports to name a few and remove quiet a lot of code, but
it we are unlikely to do that for the strictly maintenance only
branch, so it is protected with DoH-related #ifdefs.

It is implemented in a "universal" way mainly because doing it in the
specific code requires the same amount of code and is not simpler.

16 months agoImplement TLS manual read timer control functionality
Artem Boldariev [Wed, 4 Sep 2024 18:35:35 +0000 (21:35 +0300)] 
Implement TLS manual read timer control functionality

This commit adds a manual TLS read timer control mode which is
supposed to override automatic resetting of the timer when any data is
received.

It both depends and complements similar functionality in TCP.

16 months agoImplement TCP manual read timer control functionality
Artem Boldariev [Wed, 4 Sep 2024 15:53:35 +0000 (18:53 +0300)] 
Implement TCP manual read timer control functionality

This commit adds a manual TCP read timer control mode which is
supposed to override automatic resetting of the timer when any data is
received. That can be accomplished by
`isc__nmhandle_set_manual_timer()`.

This functionality is supposed to be used by multilevel networking
transports which require finer grained control over the read
timer (TLS Stream, DoH).

The commit is essentially an implementation of the functionality from
newer versions of BIND.

16 months ago[9.18] [CVE-2024-11187] sec: usr: Limit the additional processing for large RDATA...
Andoni Duarte [Wed, 15 Jan 2025 13:27:08 +0000 (13:27 +0000)] 
[9.18] [CVE-2024-11187] sec: usr: Limit the additional processing for large RDATA sets

When answering queries, don't add data to the additional section if the answer has more than 13 names in the RDATA. This limits the number of lookups into the database(s) during a single client query, reducing query processing load.

Backport of MR !750

See isc-projects/bind9#5034

Merge branch '5034-security-limit-additional-9.18' into 'v9.18.33-release'

See merge request isc-private/bind9!759

16 months agoLimit the additional processing for large RDATA sets
Ondřej Surý [Thu, 14 Nov 2024 09:37:29 +0000 (10:37 +0100)] 
Limit the additional processing for large RDATA sets

When answering queries, don't add data to the additional section if
the answer has more than 13 names in the RDATA.  This limits the
number of lookups into the database(s) during a single client query,
reducing query processing load.

Also, don't append any additional data to type=ANY queries. The
answer to ANY is already big enough.

(cherry picked from commit a1982cf1bb95c818aa7b58988b5611dec80f2408)

16 months agoIsolate using the -T noaa flag only for part of the resolver test
Ondřej Surý [Tue, 7 Jan 2025 14:22:40 +0000 (15:22 +0100)] 
Isolate using the -T noaa flag only for part of the resolver test

Instead of running the whole resolver/ns4 server with -T noaa flag,
use it only for the part where it is actually needed.  The -T noaa
could interfere with other parts of the test because the answers don't
have the authoritative-answer bit set, and we could have false
positives (or false negatives) in the test because the authoritative
server doesn't follow the DNS protocol for all the tests in the resolver
system test.

(cherry picked from commit e51d4d3b88af00d6667f2055087ebfc47fb3107c)

16 months ago[9.18] new: ci: Add shotgun perf test of DoH GET to CI
Nicki Křížek [Wed, 8 Jan 2025 14:13:04 +0000 (14:13 +0000)] 
[9.18] new: ci: Add shotgun perf test of DoH GET to CI

Add performance tests of DoH using the GET protocol to nightly pipelines.

Backport of MR !9926

Merge branch 'backport-nicki/ci-shotgun-doh-get-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9940

16 months agoAdd shotgun perf test of DoH GET to CI
Nicki Křížek [Thu, 19 Dec 2024 11:45:04 +0000 (12:45 +0100)] 
Add shotgun perf test of DoH GET to CI

(cherry picked from commit 32c5f24713ca839668f4d024feef4c1b256c8bbc)

16 months agofix: dev: Fix a bug in isc_rwlock_trylock()
Arаm Sаrgsyаn [Wed, 8 Jan 2025 10:29:14 +0000 (10:29 +0000)] 
fix: dev: Fix a bug in isc_rwlock_trylock()

When isc_rwlock_trylock() fails to get a read lock because another
writer was faster, it should wake up other waiting writers in case
there are no other readers, but the current code forgets about
the currently active writer when evaluating 'cntflag'.

Unset the WRITER_ACTIVE bit in 'cntflag' before checking to see if
there are other readers, otherwise the waiting writers, if they exist,
might not wake up.

Closes #5121

Merge branch 'aram/isc_rwlock_trylock-bugfix-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9937

16 months agoFix a bug in isc_rwlock_trylock()
Aram Sargsyan [Tue, 7 Jan 2025 13:30:26 +0000 (13:30 +0000)] 
Fix a bug in isc_rwlock_trylock()

When isc_rwlock_trylock() fails to get a read lock because another
writer was faster, it should wake up other waiting writers in case
there are no other readers, but the current code forgets about
the currently active writer when evaluating 'cntflag'.

Unset the WRITER_ACTIVE bit in 'cntflag' before checking to see if
there are other readers, otherwise the waiting writers, if they exist,
might not wake up.

17 months ago[9.18] fix: test: Various coccinelle fixes
Michal Nowak [Fri, 13 Dec 2024 15:34:11 +0000 (15:34 +0000)] 
[9.18] fix: test: Various coccinelle fixes

Backport of MR !9836

Merge branch 'backport-mnowak/cocci-more-set-if-not-null-changes-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9917

17 months agoDrop superfluous isc_mem_get() NULL check
Michal Nowak [Thu, 12 Dec 2024 16:42:50 +0000 (17:42 +0100)] 
Drop superfluous isc_mem_get() NULL check

coccinelle v1.1 trips over a superfluous isc_mem_get() NULL check in
tests/libtest/ns.c and reports the following failure in CI:

    EXN: Failure("rule starting on line 26: already tagged token:\nC code context\nFile \"./tests/libtest/ns.c\", line 350, column 1, charpos = 7939\n  around = 'if',\n  whole content = \tif (qctx != NULL) {") in ./tests/libtest/ns.c

(cherry picked from commit cf76851c7543c6dc5bf3468f9f1af017d1df5343)

17 months agoMerge tag 'v9.18.32' into bind-9.18
Andoni Duarte Pintado [Fri, 13 Dec 2024 09:41:07 +0000 (10:41 +0100)] 
Merge tag 'v9.18.32' into bind-9.18

17 months ago[9.18] fix: test: Fix "checking startup notify rate limit" failure
Mark Andrews [Fri, 13 Dec 2024 01:40:04 +0000 (01:40 +0000)] 
[9.18] fix: test:  Fix "checking startup notify rate limit" failure

Fix the loop terminating condition to get consistent sample sizes and increase the minimum number of samples from 20 to 40.

Closes #5091

Backport of MR !9894

Merge branch 'backport-5091-investigate-checking-startup-notify-rate-limit-failure-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9910

17 months agoFix startup notify rate test
Mark Andrews [Wed, 11 Dec 2024 02:32:18 +0000 (13:32 +1100)] 
Fix startup notify rate test

The terminating conditions for the startup notify test would
occasionally get ~20 records or get +10 seconds of records due to
a bad terminating condition.  Additionally 20 samples lead to test
failures.  Fix the terminating condition to use the correct conditional
(-eq -> -ge) and increase the minimum number of log entries to
average over to 22.

(cherry picked from commit 46388d07a2849d8f82d52d334caf09c986daa27c)

17 months ago[9.18] fix: test: tests/irs/resconf_test.c is missing check callbacks
Mark Andrews [Thu, 12 Dec 2024 23:58:26 +0000 (23:58 +0000)] 
[9.18] fix: test: tests/irs/resconf_test.c is missing check callbacks

Closes #5088

Backport of MR !9884

Merge branch 'backport-5088-tests-irs-resconf_test-c-is-missing-check-callbacks-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9908

17 months agoCheck that nameservers are parsed correctly
Mark Andrews [Tue, 10 Dec 2024 06:35:16 +0000 (17:35 +1100)] 
Check that nameservers are parsed correctly

Add checks that the expected nameservers where actuall addes when
parsing resolv.conf.

(cherry picked from commit c38eb871587147cdc795a11ec232eb5dbd6b285b)

17 months ago[9.18] chg: doc: Update CONTRIBUTING.md and developer docs
Nicki Křížek [Thu, 12 Dec 2024 17:13:39 +0000 (17:13 +0000)] 
[9.18] chg: doc: Update CONTRIBUTING.md and developer docs

Include the recent changes such as:
- changes to running system tests
- gitlab development workflow
- changelog and release note process

Closes #5045

Backport of MR !9784

Merge branch 'backport-5045-update-contributing-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9903

17 months agoUpdate CONTRIBUTING.md and developer doc
Nicki Křížek [Tue, 26 Nov 2024 15:33:33 +0000 (16:33 +0100)] 
Update CONTRIBUTING.md and developer doc

Include the recent changes such as:
- changes to running system tests
- gitlab development workflow
- changelog and release note process

(cherry picked from commit 39485c1f70a3577c3a883114b844770aa9b05e22)

17 months ago[9.18] fix: test: Wait for "all zones loaded" after rndc reload in "database" test
Michal Nowak [Thu, 12 Dec 2024 12:51:46 +0000 (12:51 +0000)] 
[9.18] fix: test: Wait for "all zones loaded" after rndc reload in "database" test

After the rndc reload command finished, we might have queried the
database zone sooner than it was reloaded because rndc reloads zones
asynchronously if no specific zone was provided. We should wait for "all
zones loaded" in the ns1 log to be sure.

Closes #5075

Backport of MR !9829

Merge branch 'backport-5075-database-rndc-reload-ensure-all-zones-loaded-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9901

17 months agoWait for "all zones loaded" after rndc reload in "database" test
Michal Nowak [Thu, 5 Dec 2024 10:58:12 +0000 (11:58 +0100)] 
Wait for "all zones loaded" after rndc reload in "database" test

After the rndc reload command finished, we might have queried the
database zone sooner than it was reloaded because rndc reloads zones
asynchronously if no specific zone was provided. We should wait for "all
zones loaded" in the ns1 log to be sure.

(cherry picked from commit 0bdd03db6683cd30924456823f650e37235cbce8)

17 months ago[9.18] fix: nil: update style guideline to reflect current practice
Evan Hunt [Wed, 11 Dec 2024 15:53:26 +0000 (15:53 +0000)] 
[9.18] fix: nil: update style guideline to reflect current practice

The style guide now mentions clang-format, doesn't parenthesize return values, and no longer calls for backward compatibility in public function names.

Backport of MR !9892

Merge branch 'backport-each-style-update-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9897

17 months agoupdate style guideline to reflect current practice
Evan Hunt [Tue, 10 Dec 2024 22:11:45 +0000 (14:11 -0800)] 
update style guideline to reflect current practice

It now mentions clang-format, doesn't parenthesize return values,
and no longer calls for backward compatibility in public function names.

(cherry picked from commit 9f7314eaa4ed13f141ea71219e1cd042a184cc9c)

17 months ago[9.18] fix: test: Add rr-related common test artifacts
Michal Nowak [Tue, 10 Dec 2024 18:22:55 +0000 (18:22 +0000)] 
[9.18] fix: test: Add rr-related common test artifacts

Backport of MR !9830

Merge branch 'backport-mnowak/add-rr-related-common-artifacts-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9890

17 months agoAdd rr-related common test artifacts
Michal Nowak [Thu, 5 Dec 2024 11:54:38 +0000 (12:54 +0100)] 
Add rr-related common test artifacts

(cherry picked from commit c607237b77f6cb56b51195f37685b83c73487fb6)

17 months ago[9.18] fix: ci: Set cross-version-config-tests to allow_failure in CI
Michal Nowak [Tue, 10 Dec 2024 10:22:16 +0000 (10:22 +0000)] 
[9.18] fix: ci: Set cross-version-config-tests to allow_failure in CI

Address failing cross-version-config-tests job.

Closes #5087

Backport of MR !9833

Merge branch 'backport-mnowak/cross-version-config-tests-allow-fail-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9887

17 months agoSet cross-version-config-tests to allow_failure in CI
Michal Nowak [Thu, 5 Dec 2024 14:50:40 +0000 (15:50 +0100)] 
Set cross-version-config-tests to allow_failure in CI

The December releases suffer from the ns2/managed1.conf file not being
in the mkeys extra_artifacts. This manifests only when pytest is run
with the --setup-only option, which is the case in the
cross-version-config-tests CI job. The original issue is fixed in !9815,
but the fix will be effective only when subsequent releases are out.

(cherry picked from commit 97a9d7287c075b55cd599d98e68e04121b854a1d)

17 months ago[9.18] chg: test: Use a different burst name to identify test queries
Mark Andrews [Tue, 10 Dec 2024 06:43:23 +0000 (06:43 +0000)] 
[9.18] chg: test: Use a different burst name to identify test queries

This allows easier identification of which burst is which in
named.run.

Backport of MR !9881

Merge branch 'backport-marka-use-different-burst-name-for-forensics-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9883

17 months agoUse a different burst name to identify test queries
Mark Andrews [Fri, 6 Sep 2024 04:51:24 +0000 (14:51 +1000)] 
Use a different burst name to identify test queries

This allows easier identification of which burst is which in
named.run.

(cherry picked from commit e02d66b2791242a2e2065c6747a0ab5ff2ce3130)

17 months ago[9.18] fix: test: Fix static stub subtest description
Mark Andrews [Tue, 10 Dec 2024 04:36:32 +0000 (04:36 +0000)] 
[9.18] fix: test: Fix static stub subtest description

This subtest exercises static stub behaviour when server-addresses has an address.  This was misidentified in the description.

Closes !9799

Backport of MR !9799

Merge branch 'backport-marka-fix-stub-subtest-description-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9880

17 months agoFix static stub subtest description
Mark Andrews [Tue, 1 Oct 2024 03:12:11 +0000 (13:12 +1000)] 
Fix static stub subtest description

(cherry picked from commit f173a0145425c7d598382004b0db7c0c0b4453a0)

17 months ago[9.18] fix: usr: Unknown directive in resolv.conf not handled properly
Mark Andrews [Tue, 10 Dec 2024 03:36:40 +0000 (03:36 +0000)] 
[9.18] fix: usr: Unknown directive in resolv.conf not handled properly

The line after an unknown directive in resolv.conf could accidentally be skipped, potentially affecting dig, host, nslookup, nsupdate, or delv. This has been fixed.

Closes #5084

Backport of MR !9865

Merge branch 'backport-5084-plain-unknown-keyword-in-resolv-conf-not-handled-propely-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9878

17 months agoExtend resconf_test
Mark Andrews [Mon, 9 Dec 2024 02:04:05 +0000 (13:04 +1100)] 
Extend resconf_test

Update to the new unit test framework.

Add a test for an unknown directive without any arguments.

Add test for an unknown directive without arguments, followed
by a search directive.

(cherry picked from commit c44c4fcbfbc65ffc8226c461b172c2bef83872f8)

17 months agoFix parsing of unknown directives in resolv.conf
Mark Andrews [Mon, 9 Dec 2024 03:45:38 +0000 (14:45 +1100)] 
Fix parsing of unknown directives in resolv.conf

Only call eatline() to skip to the next line if we're not
already at the end of a line when parsing an unknown directive.
We were accidentally skipping the next line when there was only
a single unknown directive on the current line.

(cherry picked from commit eb78ad20803b28f1a5ede52115ad6bd73cfeb843)

17 months ago[9.18] new: test: Add Fedora 41
Michal Nowak [Mon, 9 Dec 2024 18:00:12 +0000 (18:00 +0000)] 
[9.18] new: test: Add Fedora 41

Prereq: isc-projects/images!345

Backport of MR !9612

Merge branch 'backport-mnowak/fedora-41-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9876

17 months agoAdd Fedora 41
Michal Nowak [Thu, 10 Oct 2024 09:11:48 +0000 (11:11 +0200)] 
Add Fedora 41

(cherry picked from commit 66fddf812fd9923fb8afe12df3701ac3497e8947)

17 months ago[9.18] new: test: Add Alpine Linux 3.21
Michal Nowak [Mon, 9 Dec 2024 17:17:39 +0000 (17:17 +0000)] 
[9.18] new: test: Add Alpine Linux 3.21

Prereq: isc-projects/images!359

Backport of MR !9872

Merge branch 'backport-mnowak/alpine-3.21-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9874

17 months agoAdd Alpine Linux 3.21
Michal Nowak [Mon, 9 Dec 2024 15:35:59 +0000 (16:35 +0100)] 
Add Alpine Linux 3.21

(cherry picked from commit 6340454ea74cf7ea839251cbf9cb4ee00016bad5)

17 months ago[9.18] new: ci: Add FreeBSD 14.2
Michal Nowak [Mon, 9 Dec 2024 13:42:25 +0000 (13:42 +0000)] 
[9.18] new: ci: Add FreeBSD 14.2

Backport of MR !9838

Merge branch 'backport-mnowak/freebsd-14.2-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9870

17 months agoAdd FreeBSD 14.2
Michal Nowak [Thu, 5 Dec 2024 18:27:36 +0000 (19:27 +0100)] 
Add FreeBSD 14.2

(cherry picked from commit a5628101ee1efdd51bc709c0174dd7fdcf018f6d)

17 months ago[9.18] chg: dev: Use query counters in validator code
Matthijs Mekking [Mon, 9 Dec 2024 11:26:20 +0000 (11:26 +0000)] 
[9.18] chg: dev: Use query counters in validator code

Commit af7db8951364a89c468eda1535efb3f53adc2c1f as part of #4141 was supposed to apply the 'max-recursion-queries' quota to validator queries, but the counter was never actually passed on to 'dns_resolver_createfetch()'. This has been fixed, and the global query counter ('max-query-count', per client request) is now also added.

Related to #4980

Backport of MR !9856

Merge branch 'backport-4980-pass-counters-in-validator-createfetch-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9867

17 months agoUse query counters in validator code
Matthijs Mekking [Fri, 6 Dec 2024 15:41:15 +0000 (16:41 +0100)] 
Use query counters in validator code

Commit af7db8951364a89c468eda1535efb3f53adc2c1f as part of #4141 was
supposed to apply the 'max-recursion-queries' quota to validator
queries, but the counter was never actually passed on to
dns_resolver_createfetch(). This has been fixed, and the global query
counter ('max-query-count', per client request) is now also added.

(cherry picked from commit 5b1ae4a9485af1f7a247fd0c23d16a0ce51456ab)

17 months ago[9.18] chg: dev: Update picohttpparser.{c,h} with upstream repository
Ondřej Surý [Sun, 8 Dec 2024 13:16:07 +0000 (13:16 +0000)] 
[9.18] chg: dev: Update picohttpparser.{c,h} with upstream repository

Closes #4485

Backport of MR !9857

Merge branch 'backport-4485-update-httppicoparser-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9864

17 months agoUpdate picohttpparser.{c,h} with upstream repository
Ondřej Surý [Fri, 6 Dec 2024 17:29:39 +0000 (18:29 +0100)] 
Update picohttpparser.{c,h} with upstream repository

Upstream code doesn't do regular releases, so we need to regularly
sync the code from the upstream repository.  This is synchronization up
to the commit f8d0513 from Jan 29, 2024.

(cherry picked from commit d14a76e115479eb8018a3856a3737a75aa8fa029)

17 months ago[9.18] chg: dev: Remove unused maxquerycount
Matthijs Mekking [Fri, 6 Dec 2024 16:26:18 +0000 (16:26 +0000)] 
[9.18] chg: dev: Remove unused maxquerycount

Related to #4980

Backport of MR !9850

Merge branch 'backport-4980-remove-unused-maxqueryqount-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9854

17 months agoRemove unused maxquerycount
Matthijs Mekking [Fri, 6 Dec 2024 10:19:18 +0000 (11:19 +0100)] 
Remove unused maxquerycount

While implementing the global limit 'max-query-count', initially I
thought adding the variable to the resolver structure. But the limit
is per client request so it was moved to the view structure (and
counter in ns_query structure). However, I forgot to remove the
variable from the resolver structure again. This commit fixes that.

(cherry picked from commit 397ca34e3455a8332b4c1651032c5a7b3297cbfc)

17 months ago[9.18] new: usr: Add a new option to configure the maximum number of outgoing queries...
Matthijs Mekking [Fri, 6 Dec 2024 15:17:58 +0000 (15:17 +0000)] 
[9.18] new: usr: Add a new option to configure the maximum number of outgoing queries per client request

The configuration option 'max-query-count' sets how many outgoing queries per client request is allowed. The existing 'max-recursion-queries' is the number of permissible queries for a single name and is reset on every CNAME redirection. This new option is a global limit on the client request. The default is 200.

This allows us to send a bit more queries while looking up a single name. The default for 'max-recursion-queries' is changed from 32 to 50.

Closes #4980 Closes #4921

Backport of MR !9737

Merge branch 'backport-4980-global-limit-outgoing-queries-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9847

17 months agoChange default max-recursion-queries to 50
Matthijs Mekking [Thu, 5 Dec 2024 08:52:38 +0000 (09:52 +0100)] 
Change default max-recursion-queries to 50

Changing the default for max-recursion-queries from 100 to 32 was too
strict in some cases, especially lookups in reverse IPv6 trees started
to fail more frequently. From issue #4921 it looks like 50 is a better
default.

Now that we have 'max-query-count' as a global limit of outgoing queries
per client request, we can increase the default for
'max-recursion-queries' again, as the number of recursive queries is
no longer bound by the multiple of 'max-recursion-queries' and
'max-query-restarts'.

(cherry picked from commit 84df920d9e1e256e5132b10db098b1abfdda301e)

17 months agoAdd a CAMP test case
Matthijs Mekking [Mon, 25 Nov 2024 15:27:21 +0000 (16:27 +0100)] 
Add a CAMP test case

This adds a new test directory specifically for CAMP attacks. This first
test in this test directory follows multiple CNAME chains, restarting
the max-recursion-queries counter, but should bail when the global
maximum quota max-query-count is reached.

(cherry picked from commit 73eafaba14acff7a4e461c112dd747736814db6e)

17 months agoImplement global limit for outgoing queries
Matthijs Mekking [Mon, 11 Nov 2024 10:01:50 +0000 (11:01 +0100)] 
Implement global limit for outgoing queries

This global limit is not reset on query restarts and is a hard limit
for any client request.

Note: This commit has been significantly modified because of many
merge conflicts due to the dns_resolver_createfetch api changes.

(cherry picked from commit 16b3bd1cc743d3519a91edae896f394a689b0f0f)

17 months agoImplement getter function for counter limit
Matthijs Mekking [Fri, 29 Nov 2024 13:29:08 +0000 (14:29 +0100)] 
Implement getter function for counter limit

(cherry picked from commit ca7d487357a63e398e5094973518cdabd9f53fa0)

17 months agoImplement 'max-query-count'
Matthijs Mekking [Thu, 7 Nov 2024 09:52:19 +0000 (10:52 +0100)] 
Implement 'max-query-count'

Add another option to configure how many outgoing queries per
client request is allowed. The existing 'max-recursion-queries' is
per restart, this one is a global limit.

(cherry picked from commit bbc16cc8e6e852afd7cd95f1824429f81b7de222)

17 months ago[9.18] new: test: Add OpenBSD 7.6
Michal Nowak [Fri, 6 Dec 2024 13:34:32 +0000 (13:34 +0000)] 
[9.18] new: test: Add OpenBSD 7.6

Backport of MR !9609

Merge branch 'backport-mnowak/openbsd-7.6-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9849

17 months agoAdd OpenBSD 7.6
Michal Nowak [Wed, 9 Oct 2024 20:18:23 +0000 (22:18 +0200)] 
Add OpenBSD 7.6

(cherry picked from commit 11670b581da27d27c9adb561954a742f8fe07076)

17 months ago[9.18] chg: test: Add FreeBSD 13.4
Michal Nowak [Fri, 6 Dec 2024 10:13:34 +0000 (10:13 +0000)] 
[9.18] chg: test: Add FreeBSD 13.4

Backport of MR !9640

Merge branch 'backport-mnowak/freebsd-13.4-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9846

17 months agoAdd FreeBSD 13.4
Michal Nowak [Tue, 15 Oct 2024 13:16:22 +0000 (15:16 +0200)] 
Add FreeBSD 13.4

(cherry picked from commit 88b4367daa341b19587a63d0d58414a813326b6e)

17 months ago[9.18] fix: usr: Fix nsupdate hang when processing a large update
Matthijs Mekking [Fri, 6 Dec 2024 09:27:10 +0000 (09:27 +0000)] 
[9.18] fix: usr: Fix nsupdate hang when processing a large update

To mitigate DNS flood attacks over a single TCP connection, we throttle the connection when the other side does not read the data. Throttling should only occur on server-side sockets, but erroneously also happened for nsupdate, which acts as a client. When nsupdate started throttling the connection, it never attempts to read again. This has been fixed.

Closes #4910

Backport of MR !9709

Merge branch 'backport-4910-nsupdate-hangs-when-processing-large-update-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9835

17 months agoFix nsupdate hang when processing a large update
Matthijs Mekking [Fri, 6 Dec 2024 08:45:46 +0000 (09:45 +0100)] 
Fix nsupdate hang when processing a large update

The root cause is the fix for CVE-2024-0760 (part 3), which resets
the TCP connection on a failed send. Specifically commit
4b7c6138 stops reading on the socket
because the TCP connection is throttling.

When the tcpdns_send_cb callback thinks about restarting reading
on the socket, this fails because the socket is a client socket.
And nsupdate is a client and is using the same netmgr code.

This commit removes the requirement that the socket must be a server
socket, allowing reading on the socket again after being throttled.

(manually picked from commit aa24b77d8ba9ba2c55b71f18f54e19f71a200491)

17 months agoAdd test case for nsupdate hangs on large update
Matthijs Mekking [Fri, 1 Nov 2024 12:23:20 +0000 (13:23 +0100)] 
Add test case for nsupdate hangs on large update

This test case hangs, despite the update being performed on the
name server.

(cherry picked from commit 3adabb4f893be218b68676fd3651924190b10fca)

17 months ago[9.18] fix: usr: Fix dnssec-signzone signing non-DNSKEY RRsets with revoked keys
Mark Andrews [Fri, 6 Dec 2024 02:20:57 +0000 (02:20 +0000)] 
[9.18] fix: usr: Fix dnssec-signzone signing non-DNSKEY RRsets with revoked keys

`dnssec-signzone` was using revoked keys for signing RRsets other than DNSKEY.  This has been corrected.

Closes #5070

Backport of MR !9800

Merge branch 'backport-5070-dnssec-signzone-fix-revoke-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9841

17 months agoCheck dnssec-signzone behaviour with revoked keys
Mark Andrews [Mon, 2 Dec 2024 07:30:41 +0000 (18:30 +1100)] 
Check dnssec-signzone behaviour with revoked keys

Only DNSKEY records should be signed with a revoked key.

(cherry picked from commit 30ef6dde059a4c7d0cb8b12a572af7e1dfc450df)

17 months agoDo not sign non DNSKEY RRset with revoked keys
Mark Andrews [Fri, 29 Nov 2024 06:20:39 +0000 (17:20 +1100)] 
Do not sign non DNSKEY RRset with revoked keys

It does not make sense to sign RRsets other than DNSKEY with revoked
keys.

(cherry picked from commit 23775c6006ecf68d1da6b08488dd8242173bbd4d)

17 months ago[9.18] fix: ci: Add ns2/managed1.conf to mkeys extra_artifacts
Michal Nowak [Thu, 5 Dec 2024 10:47:59 +0000 (10:47 +0000)] 
[9.18] fix: ci: Add ns2/managed1.conf to mkeys extra_artifacts

The ns2/managed1.conf file is created by the setup.sh script. Then, in
the tests.sh script it is moved to ns2/managed.conf. The latter file
name is in mkeys extra_artifacts, but the former one is not. This is a
problem when pytest is started with the --setup-only option as it only
runs the setup.sh script (e.g., in the cross-version-config-tests CI
job) and thus failing the "Unexpected files found" assertion.

Backport of MR !9815

Merge branch 'backport-mnowak/mkeys-add-ns2-managed1-conf-to-extra-artifacts-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9825

17 months agoAdd ns2/managed1.conf to mkeys extra_artifacts
Michal Nowak [Wed, 4 Dec 2024 17:17:40 +0000 (18:17 +0100)] 
Add ns2/managed1.conf to mkeys extra_artifacts

The ns2/managed1.conf file is created by the setup.sh script. Then, in
the tests.sh script it is moved to ns2/managed.conf. The latter file
name is in mkeys extra_artifacts, but the former one is not. This is a
problem when pytest is started with the --setup-only option as it only
runs the setup.sh script (e.g., in the cross-version-config-tests CI
job) and thus failing the "Unexpected files found" assertion.

(cherry picked from commit e7d973bd008d5774c61d73a949ddd92c17b2bd25)

17 months ago[9.18] fix: usr: Fix possible assertion failure when reloading server while processin...
Mark Andrews [Thu, 5 Dec 2024 05:20:04 +0000 (05:20 +0000)] 
[9.18] fix: usr: Fix possible assertion failure when reloading server while processing updates

Closes #5006

Backport of MR !9745

Merge branch 'backport-5006-get-max-by-type-earlier-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9821

17 months agoKeep a local copy of the update rules to prevent UAF
Mark Andrews [Tue, 19 Nov 2024 14:20:42 +0000 (01:20 +1100)] 
Keep a local copy of the update rules to prevent UAF

Previously, the update policy rules check was moved earlier in the
sequence, and the keep rule match pointers were kept to maintain the
ability to verify maximum records by type.

However, these pointers can become invalid if server reloading
or reconfiguration occurs before update completion. To prevent
this issue, extract the maximum records by type value immediately
during processing and only keep the copy of the values instead of the
full ssurule.

(cherry picked from commit 44a54a29d89f8c7fcb9bbea2c87f7c0bd0393c45)

17 months agochg: doc: Set up version for BIND 9.18.33
Petr Špaček [Wed, 4 Dec 2024 15:10:39 +0000 (15:10 +0000)] 
chg: doc: Set up version for BIND 9.18.33

Merge branch 'pspacek/set-up-version-for-bind-9.18.33' into 'bind-9.18'

See merge request isc-projects/bind9!9812

17 months agoUpdate BIND version to 9.18.33-dev
Petr Špaček [Wed, 4 Dec 2024 15:07:22 +0000 (16:07 +0100)] 
Update BIND version to 9.18.33-dev

18 months agoUpdate BIND version for release v9.18.32
Petr Špaček [Tue, 3 Dec 2024 12:58:29 +0000 (13:58 +0100)] 
Update BIND version for release

18 months agonew: doc: Prepare documentation for BIND 9.18.32
Petr Špaček [Tue, 3 Dec 2024 12:57:30 +0000 (12:57 +0000)] 
new: doc: Prepare documentation for BIND 9.18.32

Merge branch 'pspacek/prepare-documentation-for-bind-9.18.32' into 'v9.18.32-release'

See merge request isc-private/bind9!757

18 months agoTweak and reword release notes
Petr Špaček [Tue, 3 Dec 2024 12:22:10 +0000 (13:22 +0100)] 
Tweak and reword release notes

18 months agoPrepare release notes for BIND 9.18.32
Petr Špaček [Tue, 3 Dec 2024 12:10:52 +0000 (13:10 +0100)] 
Prepare release notes for BIND 9.18.32

18 months agoFix Sphinx build failures on generated changelog for BIND 9.18.32
Petr Špaček [Tue, 3 Dec 2024 12:07:52 +0000 (13:07 +0100)] 
Fix Sphinx build failures on generated changelog for BIND 9.18.32

18 months agoGenerate changelog for BIND 9.18.32
Petr Špaček [Tue, 3 Dec 2024 12:05:19 +0000 (13:05 +0100)] 
Generate changelog for BIND 9.18.32

18 months ago[9.18] chg: doc: gitchangelog: don't break lines on hyphens in relnotes
Petr Špaček [Mon, 2 Dec 2024 14:01:48 +0000 (14:01 +0000)] 
[9.18] chg: doc: gitchangelog: don't break lines on hyphens in relnotes

When release notes are generated, the text is wrapped and line breaks
are inserted into each paragraph (sourced from the commit message's
body). Prevent line breaks after hyphens, as these are often used for
option names. This makes it possible to easily find the options
afterwards.

Backport of MR !9801

Merge branch 'backport-nicki/gitchangelog-dont-break-on-hyphens-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9803

18 months agogitchangelog: don't break lines on hyphens in relnotes
Nicki Křížek [Mon, 2 Dec 2024 10:10:01 +0000 (11:10 +0100)] 
gitchangelog: don't break lines on hyphens in relnotes

When release notes are generated, the text is wrapped and line breaks
are inserted into each paragraph (sourced from the commit message's
body). Prevent line breaks after hyphens, as these are often used for
option names. This makes it possible to easily find the options
afterwards.

(cherry picked from commit 9b0d0c017315c0850cde5df95609d1d0982c784f)

18 months ago[9.18] fix: dev: Use attach()/detach() functions instead of touching .references
Evan Hunt [Wed, 27 Nov 2024 22:51:34 +0000 (22:51 +0000)] 
[9.18] fix: dev: Use attach()/detach() functions instead of touching .references

In rbtdb.c, there were two places where the code touched .references
directly instead of using the helper functions.  Use the helper
functions instead.

Forward port from https://gitlab.isc.org/isc-private/bind9/-/merge_requests/753

Merge branch 'ondrej/use-attach-detach-in-rbtdb-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9796

18 months agoUse attach()/detach() functions instead of touching .references
Ondřej Surý [Wed, 27 Nov 2024 13:12:50 +0000 (14:12 +0100)] 
Use attach()/detach() functions instead of touching .references

In rbtdb.c, there were two places where the code touched .references
directly instead of using the helper functions.  Use the helper
functions instead.

18 months ago[9.18] fix: test: Fix the nslookup system test
Arаm Sаrgsyаn [Wed, 27 Nov 2024 15:54:08 +0000 (15:54 +0000)] 
[9.18] fix: test: Fix the nslookup system test

The nslookup system test checks the count of resolved addresses in
the CNAME tests using a 'grep' match on the hostname, and ignoring
lines containing the 'canonical name' string. In order to protect
the check from intermittent failures like the 'address in use' warning
message, which then automatically resolves after a retry, edit the
'grep' matching string to also ignore the comments (as the mentioned
warning message is a comment which contains the hostname).

Closes #4948

Backport of MR !9523

Merge branch 'backport-4948-nslookup-test-fix-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9792

18 months agoFix the nslookup system test
Aram Sargsyan [Thu, 19 Sep 2024 14:47:49 +0000 (14:47 +0000)] 
Fix the nslookup system test

The nslookup system test checks the count of resolved addresses in
the CNAME tests using a 'grep' match on the hostname, and ignoring
lines containing the 'canonical name' string. In order to protect
the check from intermittent failures like the 'address in use' warning
message, which then automatically resolves after a retry, edit the
'grep' matching string to also ignore the comments (as the mentioned
warning message is a comment which contains the hostname).

(cherry picked from commit 345b0f9e5ca075243e4ac662b4be299666be3207)

18 months ago[9.18] chg: usr: emit more helpful log for exceeding max-records-per-type
Mark Andrews [Wed, 27 Nov 2024 03:22:49 +0000 (03:22 +0000)] 
[9.18] chg: usr: emit more helpful log for exceeding max-records-per-type

The new log message is emitted when adding or updating an RRset
fails due to exceeding the max-records-per-type limit. The log includes
the owner name and type, corresponding zone name, and the limit value.
It will be emitted on loading a zone file, inbound zone transfer
(both AXFR and IXFR), handling a DDNS update, or updating a cache DB.
It's especially helpful in the case of zone transfer, since the
secondary side doesn't have direct access to the offending zone data.

It could also be used for max-types-per-name, but this change
doesn't implement it yet as it's much less likely to happen
in practice.

Backport of MR !9509

Merge branch 'backport-helpful-log-on-toomanyrecords-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9772

18 months agoupdate system tests to confirm new log messages
JINMEI Tatuya [Thu, 26 Sep 2024 08:04:57 +0000 (17:04 +0900)] 
update system tests to confirm new log messages

(cherry picked from commit 000720fe14266595ce37ad9ca692b28310f5a6f7)

18 months agouse more generic log module name for 'logtoomanyrecords'
JINMEI Tatuya [Wed, 18 Sep 2024 06:32:21 +0000 (15:32 +0900)] 
use more generic log module name for 'logtoomanyrecords'

DNS_LOGMODULE_RBTDB was simply inappropriate, and this
log message is actually dependent on db implementation
details, so DNS_LOGMODULE_DB would be the best choice.

(cherry picked from commit b0309ee631dc68c6462500354acc749ff41ccb55)

18 months agoemit more helpful log for exceeding max-records-per-type
JINMEI Tatuya [Thu, 29 Aug 2024 07:24:48 +0000 (16:24 +0900)] 
emit more helpful log for exceeding max-records-per-type

The new log message is emitted when adding or updating an RRset
fails due to exceeding the max-records-per-type limit. The log includes
the owner name and type, corresponding zone name, and the limit value.
It will be emitted on loading a zone file, inbound zone transfer
(both AXFR and IXFR), handling a DDNS update, or updating a cache DB.
It's especially helpful in the case of zone transfer, since the
secondary side doesn't have direct access to the offending zone data.

It could also be used for max-types-per-name, but this change
doesn't implement it yet as it's much less likely to happen
in practice.

(cherry picked from commit 4156995431290ed6ac1a96424fc3527a453ffb7c)

18 months ago[9.18] chg: test: Rewrite emptyzones system test to pytest
Michal Nowak [Tue, 26 Nov 2024 18:27:08 +0000 (18:27 +0000)] 
[9.18] chg: test: Rewrite emptyzones system test to pytest

Backport of MR !9154

Merge branch 'backport-mnowak/pytest_rewrite_emptyzones-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9783

18 months agoRewrite emptyzones system test to pytest
Michal Nowak [Wed, 17 Jul 2024 11:01:28 +0000 (13:01 +0200)] 
Rewrite emptyzones system test to pytest

(cherry picked from commit 3ace62472c5146b8177daea4861e6aee74ff526a)

18 months agoAdd isctest.check.refused()
Michal Nowak [Wed, 17 Jul 2024 13:35:05 +0000 (15:35 +0200)] 
Add isctest.check.refused()

(cherry picked from commit 7bedd1c296cfadb860225c0155b0d8bfaaa001bf)

18 months ago[9.18] chg: test: Rewrite database system test to pytest
Michal Nowak [Tue, 26 Nov 2024 16:11:04 +0000 (16:11 +0000)] 
[9.18] chg: test: Rewrite database system test to pytest

Backport of MR !9156

Merge branch 'backport-mnowak/pytest_rewrite_database-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9780

18 months agoRewrite database system test to pytest
Michal Nowak [Thu, 18 Jul 2024 08:16:16 +0000 (10:16 +0200)] 
Rewrite database system test to pytest

(cherry picked from commit 8005ad0dcd619078a8c109debb505267179c951e)