2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

41523 Commits

Author SHA1 Message Date
Matthijs Mekking
ebb90ba77f Fix ZSK rollovers in dnssec system test
1. When generating keys, don't set timing metadata. Otherwise keys
   are considered to be in use and won't be selected when dnssec-policy
   starts a new key rollover.

2. Add an extra check to make sure the new ZSK (zsk2) is prepublished.
   Also add a check to make sure it has become active.

3. When using dnssec-settime, add -s to also write to key state files.
2024-05-06 14:44:10 +02:00
Tom Krizek
2e26eac31c Ensure dnssec test doesn't leak queries to root servers
The config was recently modified to ensure ns4 won't leak any queries to
root servers. However, the test wasn't executed and it turns out the way
this was handled actually broke the test case. Add our custom root hint
to both of the views to ensure the test can still pass without leaking
any queries.
2024-05-06 14:44:09 +02:00
Tom Krizek
672b07a503 Re-enable accidentally disabled dnssec checks
Remove the premature exit statement which made the rest of the checks
unreachable.
2024-05-06 14:44:08 +02:00
Matthijs Mekking
005c1386ea Merge branch '3323-different-rpz-soa-ttl' into 'main'
RPZ response's SOA record is incorrectly set to 1

Closes #3323

See merge request isc-projects/bind9!8998
2024-05-06 10:10:42 +00:00
Matthijs Mekking
2726b569b1 Add release note and CHANGES for #3323 2024-05-06 11:39:02 +02:00
Matthijs Mekking
5d7e613e81 RPZ response's SOA record is incorrectly set to 1
An RPZ response's SOA record TTL is set to 1 instead of the SOA TTL,
a boolean value is passed on to query_addsoa, which is supposed to be
a TTL value. I don't see what value is appropriate to be used for
overriding, so we will pass UINT32_MAX.
2024-05-06 11:38:36 +02:00
Matthijs Mekking
2e99c66a00 Merge branch 'matthijs-offline-ksk-add-ksk-on-sign' into 'main'
Add DNSKEY record for KSK when creating the SKR

See merge request isc-projects/bind9!8986
2024-05-06 09:30:10 +00:00
Matthijs Mekking
03e8747aaa Retrieve DNSKEY TTL from policy
The desired DNSKEY TTL is configured in the policy so set it to that
value on new RRsets. Note that the same TTL is used for CDS and CDNSKEY.
2024-05-06 10:54:41 +02:00
Matthijs Mekking
d9fb2054f1 Rename create_cds to create_ksk
Now that this function also creates the DNSKEY record for the KSKs,
as well as other associated records such as CDS and CDNSKEY, rename
the function to something slightly better.
2024-05-06 10:54:41 +02:00
Matthijs Mekking
30ce8abd30 Add DNSKEY rr corresponding to the KSK to the SKR
When signing a KSR, add the DNSKEY records from the signing KSK(s) to
the DNSKEY RRset prior to signing.
2024-05-06 10:54:41 +02:00
Matthijs Mekking
6b7bd77596 Don't add KSKs to the KSR
Creating the KSR happens on the "ZSK side". The KSK is offline and while
the public key and state file may be present, draft-icann-dnssec-keymgmt-01.txt
suggest that the KSR only contains ZSKs.

This is also what knot dns does, so it would also be in the spirit of
interoperability.
2024-05-06 10:54:41 +02:00
Matthijs Mekking
3bf4ec95dd Merge branch 'matthijs-fix-dnssec-ksr-version-missing' into 'main'
Fix missing version in KSR

See merge request isc-projects/bind9!8983
2024-05-06 08:40:46 +00:00
Matthijs Mekking
0071e6c10a Fix missing version in KSR
The final line in a KSR ";; KeySigningRequest generated at ..." was
missing the version number, that has now been fixed.

Thanks Libor Peltan for reporting.
2024-05-06 09:52:01 +02:00
Michal Nowak
b327da30f8 Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.19.25' into 'main'
Set up version and release notes for BIND 9.19.25

See merge request isc-projects/bind9!9005
2024-05-03 14:01:59 +00:00
Michal Nowak
4fae72e2de Set up release notes for BIND 9.19.25 2024-05-03 15:51:53 +02:00
Michal Nowak
fd880c29f2 Update BIND version to 9.19.25-dev 2024-05-03 15:51:53 +02:00
Michal Nowak
be3e3da7b2 Update BIND version for release v9.19.24 2024-05-03 09:11:45 +02:00
Michal Nowak
b507cb7bc2 Add a CHANGES marker 2024-05-03 09:10:49 +02:00
Michal Nowak
8793a41d8f Merge branch 'mnowak/prepare-documentation-for-bind-9.19.24' into 'v9.19.24-release'
Prepare documentation for BIND 9.19.24

See merge request isc-private/bind9!684
2024-05-03 07:08:26 +00:00
Michal Nowak
0f81fbcb1f Tweak and reword release notes 2024-05-02 19:16:58 +02:00
Michal Nowak
8cdc0eafd9 Prepare release notes for BIND 9.19.24 2024-05-02 12:31:00 +02:00
Arаm Sаrgsyаn
265b08b98e Merge branch '4710-qpcache-crash-on-assert-in-decref' into 'main'
Fix a bug in expireheader() call arguments order

Closes #4710

See merge request isc-projects/bind9!9001
2024-05-02 10:25:55 +00:00
Aram Sargsyan
8052848d50 Fix a bug in expireheader() call arguments order
The expireheader() call in the expire_ttl_headers() function
is erroneous as it passes the 'nlocktypep' and 'tlocktypep'
arguments in a wrong order, which then causes an assertion
failure.

Fix the order of the arguments so it corresponds to the function's
prototype.
2024-05-02 08:38:35 +00:00
Evan Hunt
f8f0f45043 Merge branch '4702-qpiter-fix' into 'main'
dns_qp_lookup() doesn't handle searches for escaped characters well

Closes #4702

See merge request isc-projects/bind9!8999
2024-05-01 08:13:58 +00:00
Evan Hunt
9bbba20fbf CHANGES for [GL #4702] 2024-05-01 00:36:51 -07:00
Evan Hunt
f81bf6bafd handle QP lookups involving escaped characters better
in QP keys, characters that are not common in DNS names are
encoded as two-octet sequences. this caused a glitch in iterator
positioning when some lookups failed.

consider the case where we're searching for "\009" (represented
in a QP key as {0x03, 0x0c}) and a branch exists for "\000"
(represented as {0x03, 0x03}). we match on the 0x03, and continue
to search down. at the point where we find we have no match,
we need to pop back up to the branch before the 0x03 - which may
be multiple levels up the stack - before we position the iterator.
2024-05-01 00:36:51 -07:00
Evan Hunt
a23ce2c53c add another test case for an incorrect QP iterator position
build a database tree with names containing control characters,
search for another control character, and verify the iterator is
positioned correctly.
2024-05-01 00:36:16 -07:00
Matthijs Mekking
ada46eb9f5 Add a unit test case for converting \000\009
Sanity checking that this domain converts to the key I am expecting.

Also fix some of the other names that had trailing 0x02 bits.
2024-04-30 16:00:13 -07:00
Evan Hunt
a0bd1e67cd add a test method to print QP keys
add a method qp_test_printkey() to print the name encoded in a QP key.
2024-04-30 15:58:17 -07:00
Evan Hunt
539518bfba Merge branch 'each-qpcache-cleanup' into 'main'
clean up and speed up qpcache

See merge request isc-projects/bind9!8987
2024-04-30 20:28:52 +00:00
Evan Hunt
4b02246130 fix more ambiguous struct names
there were some structure names used in qpcache.c and qpzone.c that
were too similar to each other and could be confusing when debugging.
they have been changed as follows:

in qcache.c:
- changed_t was unused, and has been removed
- search_t -> qpc_search_t
- qpdb_rdatasetiter_t -> qpc_rditer_t
- qpdb_dbiterator_t -> qpc_dbiter_t

in qpzone.c:
- qpdb_changed_t -> qpz_changed_t
- qpdb_changedlist_t -> qpz_changedlist_t
- qpdb_version_t -> qpz_version_t
- qpdb_versionlist_t -> qpz_versionlist_t
- qpdb_search_t -> qpz_search_t
- qpdb_load_t -> qpz_search_t
2024-04-30 12:50:01 -07:00
Evan Hunt
e300dfce46 use dns_qp_getname() where possible
some calls to dns_qp_lookup() do not need partial matches, QP chains
or QP iterators. in these cases it's more efficient to use
dns_qp_getname().
2024-04-30 12:50:01 -07:00
Evan Hunt
2789e58473 get foundname from the node
when calling dns_qp_lookup() from qpcache, instead of passing
'foundname' so that a name would be constructed from the QP key,
we now just use the name field in the node data. this makes
dns_qp_lookup() run faster.

the same optimization has also been added to qpzone.

the documentation for dns_qp_lookup() has been updated to
discuss this performance consideration.
2024-04-30 12:50:01 -07:00
Evan Hunt
04d319afe4 include the nodenames when calculating memory to purge
when the cache is over memory, we purge from the LRU list until
we've freed the approximate amount of memory to be added. this
approximation could fail because the memory allocated for nodenames
wasn't being counted.

add a dns_name_size() function so we can look up the size of nodenames,
then add that to the purgesize calculation.
2024-04-30 12:50:01 -07:00
Evan Hunt
a8bda6ff1e simplify qpcache iterators
in a cache database, unlike zones, NSEC3 records are stored in
the main tree. it is not necessary to maintain a separate 'nsec3'
tree, nor to have code in the dbiterator implementation to traverse
from one tree to another.

(if we ever implement synth-from-dnssec using NSEC3 records, we'll
need to revert this change. in the meantime, simpler code is better.)
2024-04-30 12:50:01 -07:00
Evan Hunt
7ff43befb7 clean up unnecessary dbiterator code related to origin
the QP database doesn't support relative names as the RBTDB did, so
there's no need for a 'new_origin' flag or to handle `DNS_R_NEWORIGIN`
result codes.
2024-04-30 12:42:32 -07:00
Evan Hunt
85ab92b6e0 more cleanups in qpcache.c
- remove unneeded struct members and misleading comments.
- remove unused parameters for static functions.
- rename 'find_callback' to 'delegating' for consistency with qpzone;
  the find callback mechanism is not used in QP databases.
2024-04-30 12:42:31 -07:00
Evan Hunt
3acab71d46 rename QPDB_HEADERNODE to HEADERNODE
this makes the macro consistent between qpcache.c and qpzone.c.

also removed a redundant definition of HEADERNODE in qpzone.c.
2024-04-30 12:42:31 -07:00
Evan Hunt
46d40b3dca fix structure names in qpcache.c and qpzone.c
- change dns_qpdata_t to qpcnode_t (QP cache node), and dns_qpdb_t to
  qpcache_t, as these types are only accessed locally.
- also change qpdata_t in qpzone.c to qpznode_t (QP zone node), for
  consistency.
- make the refcount declarations for qpcnode_t and qpznode_t static,
  using the new ISC_REFCOUNT_STATIC macros.
2024-04-30 12:42:07 -07:00
Evan Hunt
20d32512ca clean up unnecessary requirements in qpcache.c
qpcache can only support cache semantics now, so there's
no longer any need to check for that internally.
2024-04-30 12:31:48 -07:00
Evan Hunt
a5d0e6c4ba add static macros for ISC_REFCOUNT_DECL/IMPL
this commit adds a mechanism to statically declare attach/detach
and ref/unref methods, for objects that are only accessed within
a single C file.
2024-04-30 12:31:48 -07:00
Ondřej Surý
bc8095311a Merge branch 'ondrej/improve-newref-checks' into 'main'
Improve the reference counting in newref()

See merge request isc-projects/bind9!8914
2024-04-30 18:43:39 +00:00
Ondřej Surý
c13a1d8b01 Improve the reference counting checks in newref()
In qpcache (and rbtdb), there are some functions that acquire
neither the tree lock nor the node lock when calling newref().
In theory, this could lead to a race in which a new reference
is added to a node that was about to be deleted.

We now detect this condition by passing the current tree and node
lock status to newref(). If the node was previously unreferenced
and we don't hold at least one read lock, we will assert.
2024-04-30 08:41:56 +02:00
Michal Nowak
b1b9ac1cba Merge branch 'mnowak/stress-tests-freebsd-instance-autoscaler' into 'main'
Use FreeBSD autoscaler for "stress" tests

See merge request isc-projects/bind9!8968
2024-04-29 18:10:52 +00:00
Michal Nowak
65a93b77e1 Use FreeBSD autoscaler for "stress" tests
The FreeBSD autoscaler has been configured to utilize the new "instance"
GitLab Runner executor to spawn "stress" test CI jobs on AWS EC2
dynamically. A shared GitLab Runner named "freebsd-instance-autoscaler"
has been set up in GitLab CI/CD to communicate with EC2, provisioning VM
instances on demand based on a FreeBSD 13 AMI image. This image is the
same as the one previously used for FreeBSD "stress" tests before the
implementation of autoscaling (specifically, the
"freebsd13-amd64-bind9stress.aws.lab.isc.org" GitLab Runner in CI/CD).
2024-04-29 19:53:51 +02:00
Michał Kępień
29cef34a34 Merge branch 'michal/update-urls-and-paths-for-the-bind-9-qa-repository' into 'main'
Update URLs and paths for the BIND 9 QA repository

See merge request isc-projects/bind9!8990
2024-04-29 09:48:06 +00:00
Michał Kępień
25ec1d79e4 Update URLs and paths for the BIND 9 QA repository
Since the BIND 9 QA repository has been made public, adjust the relevant
URLs and paths used in .gitlab-ci.yml so that they work with the public
version of that repository.
2024-04-26 18:43:07 +02:00
Aydın Mercan
79573f1390 Merge branch '4523-dnstap-support-for-new-transport-protocols' into 'main'
Emit and read correct DoT and DoH dnstap entries

Closes #4523

See merge request isc-projects/bind9!8697
2024-04-26 15:47:46 +00:00
Aydın Mercan
042bb98846 Add CHANGES and release note for [GL #4523] 2024-04-26 16:12:29 +03:00
Aydın Mercan
f30008a71c Provide an early escape hatch for ns_client_transport_type
Because some tests don't have a legtimate handle, provide a temporary
return early that should be fixed and removed before squashing. This
short circuiting is still correct until DoQ/DoH3 support is introduced.
2024-04-26 16:12:29 +03:00