Commit Graph

41445 Commits

Author SHA1 Message Date
Mark Andrews
edb1df856e Check for overflow when adding lifetime
(cherry picked from commit 25845a866e)
2024-07-30 10:22:48 +00:00
Matthijs Mekking
b489e267d4 No longer update key lifetime if key is retired
The key lifetime should no longer be adjusted if the key is being
retired earlier, for example because a manual rollover was started.

This would falsely be seen as a dnssec-policy lifetime reconfiguration,
and would adjust the retire/removed time again.

This also means we should update the status output, and the next
rollover scheduled is now calculated using (retire-active) instead of
key lifetime.

(cherry picked from commit 129973ebb0)
2024-07-30 10:22:48 +00:00
Matthijs Mekking
bfb29acc7f Update key lifetime and metadata after reconfig
If dnssec-policy is reconfigured and the key lifetime has changed,
update existing keys with the new lifetime and adjust the retire
and removed timing metadata accordingly.

If the key has no lifetime yet, just initialize the lifetime. It
may be that the retire/removed timing metadata has already been set.

Skip keys which goal is not set to omnipresent. These keys are already
in the progress of retiring, or still unused.

(cherry picked from commit 1cec0b0448)
2024-07-30 10:22:48 +00:00
Matthijs Mekking
671414ba42 Test updating dnssec-policy key lifetime
Check if the key lifetime is updated in the key files. Make sure the
inactive and removed timing metadata are adjusted accordingly.

(cherry picked from commit 2237895bb4)
2024-07-30 10:22:48 +00:00
Matthijs Mekking
1da982e6d0 Move dnssec-policy to kasp-fips.conf.in
All dnssec-policy configurations are here, so why not this one?

(cherry picked from commit 93326e3e18)
2024-07-30 10:22:48 +00:00
Matthijs Mekking
75e3154df9 [9.20] fix: doc: Fix typo in key-store reference rst
Closes #4813

Backport of MR !9176

Merge branch 'backport-4813-fix-typo-in-reference-rst-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9189
2024-07-30 09:40:45 +00:00
Suzanne Goldlust
ab790d7092 Fix backslashes on key-store block
(cherry picked from commit 645cd0496e)
2024-07-30 08:45:35 +00:00
Nicki Křížek
d2afa7f07d [9.20] chg: test: Retry job in case of AWS Spot Instance interruption event
Closes #4777

Backport of MR !9107

Merge branch '4777-retry-job-aws-spot-instance-interruption-event-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9184
2024-07-29 14:52:03 +00:00
Emanuel Petr
d4690abd06 Retry job in case of AWS Spot Instance interruption
(cherry picked from commit bbcce1bfc1)
2024-07-29 13:26:49 +00:00
Nicki Křížek
cf60eb2738 [9.20] new: dev: generate changelog from git log
Use a single source of truth, the git log, to generate the list of CHANGES. Use the .rst format and include it in the ARM for a quick reference with proper gitlab links to issues and merge requests.

Closes #75

Backport of MR !9152

Merge branch 'nicki/add-gitchangelog-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9180
2024-07-29 13:22:25 +00:00
Nicki Křížek
e9780d55bf Update docs and processes to use the new changelog
(cherry picked from commit bcc99213a5)
2024-07-29 14:44:59 +02:00
Nicki Křížek
98f7d68062 Update dangerfile for new changelog workflow
(cherry picked from commit 91be111dc7)
2024-07-29 14:44:59 +02:00
Nicki Křížek
96767a9cf6 Skip pylint checks for contrib directory
The files in contrib/ directory shouldn't be subject to our pylint
check. They can come from external sources and we don't subject these to
the same standards as the rest of the BIND9 code / scripts.

(cherry picked from commit 7cbb052649)
2024-07-29 14:44:59 +02:00
Nicki Křížek
417066f792 Remove changes job and related scripts
These are no longer needed, since changelog is generated using
gitchangelog.

(cherry picked from commit 3f1a843695)
2024-07-29 14:44:59 +02:00
Nicki Křížek
9beffa5a8d Add BIND9 configuration for gitchangelog
The configuration has been crafted to cater for BIND9 needs:
- Define actions that have an equivalent section in existing Release
  Notes
- Assume the commits that have the necessary changelog makrup are merge
  commits from GitLab and transform them into messages and proper links
- Put the resulting changelog into the proper place in
  doc/arm/changelog.rst
- Have a separate configuration for changelog and release notes. Both of
  these should be generated from the `git log`, with release notes being
  subject to more scrutiny and further editing

(cherry picked from commit 0ec8b99ea3)
2024-07-29 14:44:57 +02:00
Nicki Křížek
1e4bccf250 Add new changelog file
Create new changelog and include it in the documentation. Include the
previous CHANGES as plain text without any markup.

(cherry picked from commit e9b6031e0c)
2024-07-29 14:44:39 +02:00
Nicki Křížek
c6119b5513 Address gitchangelog deprecation warning
(cherry picked from commit 951280bca5)
2024-07-29 12:34:03 +00:00
Nicki Křížek
d4a76252f0 Adjust gitchangelog whitespace
Format the output to produce a nicer looking rst output, similar to the
former CHANGES file.

(cherry picked from commit 1c95eeeb3f)
2024-07-29 12:34:03 +00:00
Nicki Křížek
6c7a0b1a94 Allow gitchangelog to include commit sha
Add an option which can be used to put short commit sha at the end of
each commit subject line in the generated changelog.

(cherry picked from commit c2b23fa2de)
2024-07-29 12:34:03 +00:00
Nicki Křížek
226bd5cfe0 Remove authors from gitchangelog output
Given our workflow, this could easily lead to misattribution. It's also
not an actionable information and it can be found in the MR / git log
instead.

(cherry picked from commit a8258d1c53)
2024-07-29 12:34:03 +00:00
Nicki Křížek
e0feedcab7 Reformat gitchangelog with black
(cherry picked from commit 9f90c1c65e)
2024-07-29 12:34:03 +00:00
Nicki Křížek
f64aaf1a40 Import gitchanglog 3.0.4
The  project hasn't seen any new development/changes since 2018 and it
seems unlikely we'd be able to get any changes into the upstream. Since
it's isolated into a single file and its task is fairly straighforward,
pull the code into our own repository and maintain it here as needed.

This also makes it easier to make any changes that are specific to our
project.

(cherry picked from commit 63247d8a73)
2024-07-29 12:34:02 +00:00
Nicki Křížek
7e210d9212 Set up version and release notes for BIND 9.20.1
Merge branch 'nicki/set-up-version-and-release-notes-for-bind-9.20.1' into 'bind-9.20'

See merge request isc-projects/bind9!9167
2024-07-23 16:37:23 +00:00
Nicki Křížek
856d73003b Set up release notes for BIND 9.20.1 2024-07-23 17:49:29 +02:00
Nicki Křížek
71d137939d Update BIND version to 9.20.1-dev 2024-07-23 17:49:28 +02:00
Nicki Křížek
03e289030e Merge tag 'v9.20.0' 2024-07-23 17:15:41 +02:00
Nicki Křížek
14bbdfc7b9 Update BIND version to 9.20.0 v9.20.0 2024-07-08 15:01:00 +02:00
Nicki Křížek
c299dece45 Add a CHANGES marker 2024-07-08 14:58:59 +02:00
Nicki Křížek
844864041c Merge branch 'nicki/prepare-documentation-for-bind-9.20.0' into 'v9.20.0-release'
Prepare documentation for BIND 9.20.0

See merge request isc-private/bind9!710
2024-07-08 12:55:47 +00:00
Nicki Křížek
3489840948 Update documentation for 9.20.0 2024-07-08 14:53:01 +02:00
Nicki Křížek
890ebd3fd3 Create release notes for 9.20.0 2024-07-08 14:53:01 +02:00
Nicki Křížek
1fa52674e1 Extend max-types-per-name documentation 2024-07-08 14:53:01 +02:00
Nicki Křížek
322110a797 Document new -J option for dnssec-signzone and dnssec-verify 2024-07-08 14:53:01 +02:00
Nicki Křížek
b3423bb347 Reorder release notes 2024-07-08 14:53:01 +02:00
Nicki Křížek
6d44c8fcbd Tweak and reword release notes 2024-07-08 14:53:00 +02:00
Nicki Křížek
10d2aceb02 Add release note for [GL #4708] 2024-07-08 14:53:00 +02:00
Nicki Křížek
a624b8c541 Add release note for [GL #4736] 2024-07-08 14:53:00 +02:00
Nicki Křížek
0a584eb318 Add release note for [GL #3472] 2024-07-08 14:53:00 +02:00
Nicki Křížek
e847f32a36 Prepare release notes for BIND 9.19.25
This version won't be released. This commit is just a preparation for
9.20.0.
2024-07-08 14:53:00 +02:00
Nicki Křížek
3d307f869d Add another placeholder for [GL #4480]
(cherry picked from commit 1680916d67)
2024-07-08 14:52:58 +02:00
Nicki Křížek
99309ce8ae Merge branch 'tcp-reset-connection-on-failed-send' into 'v9.20.0-release'
[CVE-2024-0760 (part 3)] Reset the TCP connection on a failed send

See merge request isc-private/bind9!721
2024-07-03 15:50:58 +00:00
Artem Boldariev
5781ff3a93 Drop expired but not accepted TCP connections
This commit ensures that we are not attempting to accept an expired
TCP connection as we are not interested in any data that could have
been accumulated in its internal buffers. Now we just drop them for
good.
2024-07-03 15:03:02 +03:00
Ondřej Surý
bf9fd2a6ff Reset the TCP connection on a failed send
When sending fails, the ns__client_request() would not reset the
connection and continue as nothing is happening.  This comes from the
model that we don't care about failed UDP sends because datagrams are
unreliable anyway, but it greatly affects TCP connections with
keep-alive.

The worst case scenario is as follows:

1. the 3-way TCP handshake gets completed
2. the libuv calls the "uv_connection_cb" callback
3. the TCP connection gets queue because of the tcp-clients quota
4. the TCP client sends as many DNS messages as the buffers allow
5. the TCP connection gets dropped by the client due to the timeout
6. the TCP connection gets accepted by the server
7. the data already sent by the client gets read
8. all sending fails immediately because the TCP connection is dead
9. we consume all the data in the buffer in a very tight loop

As it doesn't make sense to trying to process more data on the TCP
connection when the sending is failing, drop the connection immediately
on the first sending error.
2024-07-03 09:07:20 +02:00
Ondřej Surý
1c0564d715 Remove ns_query_init() cannot fail, remove the error paths
As ns_query_init() cannot fail now, remove the error paths, especially
in ns__client_setup() where we now don't have to care what to do with
the connection if setting up the client could fail.  It couldn't fail
even before, but now it's formal.
2024-07-03 09:05:51 +02:00
Ondřej Surý
bc3e713317 Throttle the reading when writes are asynchronous
Be more aggressive when throttling the reading - when we can't send the
outgoing TCP synchronously with uv_try_write(), we start throttling the
reading immediately instead of waiting for the send buffers to fill up.

This should not affect behaved clients that read the data from the TCP
on the other end.
2024-07-03 08:45:39 +02:00
Nicki Křížek
92a73bca2d Merge branch '3405-security-limit-the-number-of-resource-records-in-rrset-nxdomain' into 'v9.20.0-release'
[CVE-2024-1737 (part 2)] Be smarter about refusing to add many RR types to the database

See merge request isc-private/bind9!712
2024-07-02 11:05:37 +00:00
Ondřej Surý
4089f4e2c3 Add more tests for adding many RR types to the database
More reclimit tests that test various scenarios adding combinations of
priority and non-priority RR types into the database.
2024-07-01 12:49:02 +02:00
Ondřej Surý
57cd34441a Be smarter about refusing to add many RR types to the database
Instead of outright refusing to add new RR types to the cache, be a bit
smarter:

1. If the new header type is in our priority list, we always add either
   positive or negative entry at the beginning of the list.

2. If the new header type is negative entry, and we are over the limit,
   we mark it as ancient immediately, so it gets evicted from the cache
   as soon as possible.

3. Otherwise add the new header after the priority headers (or at the
   head of the list).

4. If we are over the limit, evict the last entry on the normal header
   list.
2024-07-01 12:48:51 +02:00
Ondřej Surý
58f660cf2b Make the resolver qtype ANY test order agnostic
Instead of relying on a specific order of the RR types in the databases
pick the first RR type as returned from the cache.
2024-07-01 12:47:30 +02:00
Ondřej Surý
b27c6bcce8 Expand the list of the priority types and move it to db_p.h
Add HTTPS, SVCB, SRV, PTR, NAPTR, DNSKEY and TXT records to the list of
the priority types that are put at the beginning of the slabheader list
for faster access and to avoid eviction when there are more types than
the max-types-per-name limit.
2024-07-01 12:47:30 +02:00