Commit Graph
38910 Commits
Author SHA1 Message Date
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 AndrewsandEvan Hunt a3cdf22b60 Ignore reformat sources with up-to-date clang-format-18 2024-05-17 16:22:56 -07:00
Mark AndrewsandEvan Hunt 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 AndrewsandMichal Nowak 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 MekkingandMichal Nowak 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 KrizekandMichal Nowak 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
Mark Andrews 35f1e43273 Use dns_view_findzone instead of dns_zt_find
With weak zone attachments being used for catzs, catzs->view->zonetable
may be NULL so we need to account for this which dns_view_findzone
does.  This is already done in main.
2024-05-14 08:46:00 +10:00
Mark Andrews 35d908caa8 catz should use weak attachment to the view
(cherry picked from commit 941ad2b3c5)
2024-05-09 10:53:02 +10:00
Mark Andrews d12def13f6 catzs->view should maintain a view reference
Use dns_view_weakattach and dns_view_weakdetach to maintain a
reference to the view referenced through catzs->view.

(cherry picked from commit 307e3ed9a6)
2024-05-09 10:22:00 +10:00
Petr Špaček af3763a35d Merge branch 'pspacek/doc-rfc-ref-update-9.18' into 'bind-9.18'
[9.18] Update RFC references in documentation

See merge request isc-projects/bind9!9021
2024-05-08 07:16:32 +00:00
Petr Špaček 834621f53f Update reference for Catalog Zones spec to RFC9432
(cherry picked from commit ead4a110ad)
2024-05-08 07:09:35 +00:00
Petr Špaček 9291689720 Update KSK root sentinel references
The mechanism was published as RFC 8509. I've briefly looked at diff
between versions -08 and the RFC and did not find significant protocol
change. Quick manual check confirms what we seem to comply with the
published protocol.

(cherry picked from commit 153311da2d)
2024-05-08 07:09:35 +00:00
Petr Špaček f148d39a9b Mention RFC 9276 Guidance for NSEC3 Parameter Settings
Draft was eventually published as RFC 9276 but we did not update our
docs. Also add couple mentions in relevant places in the ARM and
dnssec-signzone man page, mainly around "do not touch" places.

(cherry picked from commit 8e4c0329c3)
2024-05-08 07:09:35 +00:00