Commit graph

38917 commits

Author SHA1 Message Date
Matthijs Mekking
01934f9def Add CHANGES entry for [GL #4708]
(cherry picked from commit 113968f3a0)
2024-06-03 10:22:08 +02:00
Matthijs Mekking
e1a49ee6d4 Call reset_shutdown if uv_tcp_close_reset failed
If uv_tcp_close_reset() returns an error code, this means the
reset_shutdown callback has not been issued, so do it now.

(cherry picked from commit c40e5c8653)
2024-06-03 08:16:32 +00:00
Matthijs Mekking
6f6d90fd51 Do not runtime check uv_tcp_close_reset
When we reset a TCP connection by sending a RST packet, do not bother
requiring the result is a success code.

(cherry picked from commit 5b94bb2129)
2024-06-03 08:16:32 +00:00
Aydın Mercan
eaacc6d4d6 Merge branch '4742-tcp4clients-statistic-is-inaccurate' into 'bind-9.18'
Increase TCP4Clients/TCP6Clients after point of no failure

See merge request isc-projects/bind9!9066
2024-05-30 11:28:48 +00:00
Michał Kępień
cb79240091
Document TCP4Clients/TCP6Clients
Commit abc47f5ce4 added two new statistics
counters without documenting them.  Add the missing counter descriptions
to the ARM.
2024-05-30 13:39:23 +03:00
Aydın Mercan
1dc58c31be
add CHANGES and release note for GL #4425 2024-05-30 13:39:23 +03:00
Aydın Mercan
dc9f55da5b
increase TCP4Clients/TCP6Clients after point of no failure
Failing to accept TCP/TLS connections in 9.18 detaches the quota in
isc__nm_failed_accept_cb, causing TCP4Clients and TCP6Clients statistics
to not decrease inside cleanup.

Fix by increasing the counter after the point of no failure but before
handling statistics through the client's socket is no longer valid.
2024-05-30 13:39:23 +03:00
Ondřej Surý
b51e308dab Merge branch '4750-set-loop-on-incoming-transfer-9.18' into 'bind-9.18'
[9.18] Create the new database for AXFR from the dns_zone API

See merge request isc-projects/bind9!9075
2024-05-29 07:37:55 +00:00
Ondřej Surý
7c275be420
Create the new database for AXFR from the dns_zone API
The `axfr_makedb()` didn't set the loop on the newly created database,
effectively killing delayed cleaning on such database.  Move the
database creation into dns_zone API that knows all the gory details of
creating new database suitable for the zone.

(cherry picked from commit 3310cac2b0)
2024-05-29 08:56:38 +02:00
Nicki Křížek
dc8b420331 Merge branch 'nicki/use-bind-team-gitlab-tokens-9.18' into 'bind-9.18'
[9.18] Use bind-team tokens for CI gitlab access

See merge request isc-projects/bind9!9068
2024-05-27 11:36:23 +00:00
Nicki Křížek
16322b3390 Use BIND_TEAM_WRITE_TOKEN for autobackport bot
This is done to unify the token usage across our repositories to
simplify token maintenance.

(cherry picked from commit d391f0c958)
2024-05-27 11:28:06 +00:00
Nicki Křížek
acbe0c827e Use BIND_TEAM_API_TOKEN for danger bot
This is done to unify the token usage across our repositories to
simplify token maintenance.

(cherry picked from commit 6767172bc0)
2024-05-27 11:28:06 +00:00
Michal Nowak
30170190d7 Merge branch 'mnowak/alpine-3.20-9.18' into 'bind-9.18'
[9.18] Add Alpine Linux 3.20

See merge request isc-projects/bind9!9060
2024-05-23 12:12:33 +00:00
Michal Nowak
2a4354f88e Add Alpine Linux 3.20
(cherry picked from commit 6f22e79ef9)
2024-05-23 11:22:37 +00:00
Michal Nowak
7f81d5eb49 Merge branch 'mnowak/short-stress-tests-should-keep-artifacts-9.18' into 'bind-9.18'
[9.18] Short stress tests should keep artifacts

See merge request isc-projects/bind9!9057
2024-05-22 12:14:00 +00:00
Michal Nowak
312e84fe73 Short stress tests should keep artifacts
(cherry picked from commit aa72747c80)
2024-05-22 10:56:00 +00:00
Evan Hunt
eea1a27dd4 Merge branch '4730-clang-format-header-file-changes-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Clang format header file changes"

See merge request isc-projects/bind9!9053
2024-05-17 23:55:10 +00:00
Mark Andrews
a3cdf22b60 Ignore reformat sources with up-to-date clang-format-18 2024-05-17 16:22:56 -07:00
Mark Andrews
26b6ce9a56 Clang-format header file changes 2024-05-17 16:21:35 -07:00
Arаm Sаrgsyаn
5c51f595a2 Merge branch 'aram/isc_task_purgeevent-race-fix' into 'bind-9.18'
Fix a data race in isc_task_purgeevent()

See merge request isc-projects/bind9!8937
2024-05-17 12:46:48 +00:00
Aram Sargsyan
903f6f5bdf Add a CHANGES note for [GL !8937] 2024-05-17 12:08:27 +00:00
Aram Sargsyan
0a48252b53 Fix a data race in isc_task_purgeevent()
When isc_task_purgeevent() is called for and 'event', the event, in
the meanwhile, could in theory get processed, unlinked, and freed.
So when the function then operates on the 'event', it causes a
segmentation fault.

The only place where isc_task_purgeevent() is called is from
timer_purge().

In order to resolve the data race, call isc_task_purgeevent() inside
the 'timer->lock' locked block, so that timerevent_destroy() won't
be able to destroy the event if it was processed in the meanwhile,
before isc_task_purgeevent() had a chance to purge it.

In order to be able to do that, move the responsibility of calling
isc_event_free() (upon a successful purge) out from the
isc_task_purgeevent() function to its caller instead, so that it can
be called outside of the timer->lock locked block.
2024-05-17 12:08:27 +00:00
Aram Sargsyan
857f6adaec Test a race condition between isc_timer_purge() and isc_event_free()
Let basic_tick() of 'task1' and 'basic_quick' of 'task4' run in
different threads, and insert an artificial delay in timer_purge()
to cause an existing race condition to appear.
2024-05-17 10:49:57 +00:00
Aram Sargsyan
c7b15f1f5a Expose internal timer_purge() as isc_timer_purge()
This function is used in a unit test to check for data races.
2024-05-17 10:49:57 +00:00
Mark Andrews
5ac515de1a Merge branch '4726-increase-formerr-coverage-in-message-parsing-9.18' into 'bind-9.18'
[9.18] Resolve "Increase FORMERR coverage in message parsing"

See merge request isc-projects/bind9!9048
2024-05-17 07:14:48 +00:00
Mark Andrews
f7fb020b6e add test cases for several FORMERR code paths:
- duplicated question
  - duplicated answer
  - qtype as an answer
  - two question types
  - question names
  - nsec3 bad owner name
  - short record
  - short question
  - mismatching question class
  - bad record owner name
  - mismatched class in record
  - mismatched KEY class
  - OPT wrong owner name
  - invalid RRSIG "covers" type
  - UPDATE malformed delete type
  - TSIG wrong class
  - TSIG not the last record

(cherry picked from commit 6e9ed4983e)
2024-05-17 15:34:07 +10:00
Michal Nowak
1e8e90ee44 Merge tag 'v9.18.27' into bind-9.18 2024-05-16 11:40:54 +02:00
Mark Andrews
69a822a639 Merge branch '4517-dnssec-verify-reports-errors-in-nsec3-chain-9.18' into 'bind-9.18'
[9.18] Resolve "dnssec-verify reports errors in NSEC3 chain"

See merge request isc-projects/bind9!9041
2024-05-16 02:44:49 +00:00
Mark Andrews
87242885e4 Add CHANGES note for [GL #4517]
(cherry picked from commit e4dbf4be8e)
2024-05-16 12:10:36 +10:00
Mark Andrews
e854c65f43 Don't sign non-apex DNSKEY records
DNSKEY can only be validated if it is signed by itself.  Stop
attempting to sign non apex DNSKEY RRsets.

(cherry picked from commit dd13f41ae1)
2024-05-16 12:10:01 +10:00
Mark Andrews
18bbd71015 Remove invalid DNSKEY RRset from zone
(cherry picked from commit 315ad2df7a)
2024-05-16 12:10:01 +10:00
Mark Andrews
797ec13904 Add regression test data for [GL #4517]
An obscured DNSKEY RRset at a delegation was incorrectly added to
the NSEC/NSEC3 type bit map leading to zone verification failures.
This adds such a RRset to the test zone.

(cherry picked from commit 122111f75e)
2024-05-16 12:10:01 +10:00
Mark Andrews
529fa790a9 Fail if there are non apex DNSKEYs
DNSSEC only works when DNSKEYs are self signed.  This only occurs
when the DNSKEY RRset is at the apex.  Cause dnssec-signzone to
fail if it attempts to sign an non-apex DNSKEY RRset.

(cherry picked from commit b3efc15be4)
2024-05-16 12:09:57 +10:00
Mark Andrews
29292902c0 Properly build the NSEC/NSEC3 type bit map
DNSKEY was incorrectly being added to the NESC/NSEC3 type bit map
when it was obscured by the delegation.  This lead to zone verification
failures.

(cherry picked from commit ec3c624814)
2024-05-16 01:53:39 +00:00
Mark Andrews
32589b2be7 Properly update 'maxtype'
'maxtype' should be checked to see if it should be updated whenever
a type is added to the type map.

(cherry picked from commit e84615629f)
2024-05-16 01:53:39 +00:00
Michał Kępień
922c1fbcad Merge branch '4719-prevent-passing-null-to-dns_dispatch_resume' into 'bind-9.18'
Prevent passing NULL to dns_dispatch_resume()

See merge request isc-projects/bind9!9035
2024-05-15 20:10:23 +00:00
Michał Kępień
e8243e1907
Add release note for GL #4719 2024-05-15 21:24:24 +02:00
Michał Kępień
31d22149fb
Add CHANGES for GL #4719 2024-05-15 21:24:24 +02:00
Michał Kępień
df346b0088
Prevent passing NULL to dns_dispatch_resume()
If a query sent using the dns_request API times out when the view it was
associated with gets torn down, the dns_dispatch_resume() call in
req_response() may be issued with the 'resp' argument set to NULL,
triggering an assertion failure.  Consider the following scenario ([A]
and [B] are thread identifiers):

 1. [A] Read timeout for a dispatch query fires.

 2. [A] udp_recv() is called.  It locks the dispatch, determines it
    timed out, prepares for calling the higher-level callback with
    ISC_R_TIMEDOUT, and unlocks the dispatch (lib/dns/dispatch.c:633).

 3. [B] The last reference to a view is released.
    dns_requestmgr_shutdown() is called, canceling all in-flight
    requests for that view.  (Note that udp_recv() in thread [A] already
    unlocked the dispatch, so its state can be modified.)  As a part of
    this process, request_cancel() calls dns_dispatch_done() on
    request->dispentry, setting it to NULL.

 4. [A] udp_recv() calls the higher-level callback (req_response()) with
    ISC_R_TIMEDOUT.

 5. [A] Since the request timed out, req_response() retries sending it.
    In the process, it calls dns_dispatch_resume(), passing
    request->dispentry as the 'resp' argument.

 6. [A] Since 'resp' is NULL, the REQUIRE(VALID_RESPONSE(resp));
    assertion in dns_dispatch_resume() fails.

Fix by checking whether the request has been canceled before calling
dns_dispatch_resume(), similarly to how it is done in req_connected()
and req_senddone().
2024-05-15 21:24:24 +02:00
Michal Nowak
be0fb9b23e Merge branch '4635-enhance-xferquota-zone-handling' into 'bind-9.18'
Enhance xferquota zone handling

See merge request isc-projects/bind9!9039
2024-05-15 12:46:46 +00:00
Mark Andrews
e27acff332
Address qp/rbtdb backup file style differences
qp and rbtdb produce stylistically different backup files.  This
was causing the xferquota system test to fail.  This has been
addressed by making the test independent of the stylistic differences.

(cherry picked from commit 1482e9bbb9)
2024-05-15 10:58:42 +02:00
Matthijs Mekking
5bb7d952a7
Fix xferquota system test
The change from RBT to QP has changed the contents of generated zone
files slightly: node names are now always absolute, so instead of using
$ORIGIN and relative names, generated zone files use full names for all
records.

This caused a failure in the xferquota system test, which was looking
for a relative name in secondary zone files. Replace the string
matching with a regular expression to fix the test.

(cherry picked from commit 618c963cb7)
2024-05-15 10:58:37 +02:00
Nicki Křížek
9c6c5628ed Merge branch 'nicki/add-mailmap-9.18' into 'bind-9.18'
[9.18] Add .mailmap to the git repo

See merge request isc-projects/bind9!9030
2024-05-14 12:54:14 +00:00
Nicki Křížek
59d337e8d7
Add .mailmap to the git repo
Mailmap can be used to unify the display name in standard git tools.

(cherry picked from commit 986013a708)
2024-05-14 14:23:42 +02:00
Michal Nowak
3ce5b76d31 Merge branch 'mnowak/pytest_rewrite_include-multiplecfg-9.18' into 'bind-9.18'
[9.18] Rewrite include-multiplecfg system test to pytest

See merge request isc-projects/bind9!9029
2024-05-14 11:52:48 +00:00
Michal Nowak
fb7366db3e
Rewrite include-multiplecfg system test to pytest
(cherry picked from commit e9e8753306)
2024-05-14 12:54:40 +02:00
Michal Nowak
ec42164265
Use isctest.run.cmd() helper function in tests
(cherry picked from commit 77a42f8875)
2024-05-14 12:54:26 +02:00
Tom Krizek
78c3838310 Add isctest.run.cmd() helper function
(cherry picked from commit a9f3fb3db5)
2024-05-14 10:47:51 +00:00
Mark Andrews
6ef02ffd69 Merge branch '4502-missing-reference-9.18' into 'bind-9.18'
[9.18] Resolve "Missing reference?"

See merge request isc-projects/bind9!9024
2024-05-13 23:52:31 +00:00
Mark Andrews
f7c76fe6da Add CHANGES for [GL #4502]
(cherry picked from commit 53698ad58d)
2024-05-14 08:46:00 +10:00