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

38156 Commits

Author SHA1 Message Date
Michał Kępień
e68ca96db2 Merge branch 'michal/rework-the-security-incident-handling-checklist' into 'main'
Rework the Security Incident Handling Checklist

See merge request isc-projects/bind9!6980
2023-01-27 13:10:23 +00:00
Michał Kępień
9565d09f1c Update release checklist
Update the release checklist to incorporate some minor tweaks that we
have been applying manually for the past few months as a result of
release process evolution.
2023-01-27 14:10:09 +01:00
Michał Kępień
2c20f23b69 Rework the Security Incident Handling Checklist
Rework the Security Incident Handling Checklist so that it does not only
contain the SWENG-side steps for handling a security incident, but also
all the other steps required by ISC procedures.
2023-01-27 14:10:09 +01:00
Michał Kępień
0185e0874c Merge branch 'michal/extend-artifact-lifetime-for-release-related-jobs' into 'main'
Extend artifact lifetime for release-related jobs

See merge request isc-projects/bind9!7432
2023-01-27 12:29:06 +00:00
Michał Kępień
71c9d69145 Extend artifact lifetime for release-related jobs
Artifacts of the "stress" jobs in GitLab CI are used for generating the
QA summary for a given set of releases.  It happened in the past that
these artifacts were purged before the QA summary was prepared,
unnecessarily prolonging the release process.  A complete set of
artifacts from all such jobs for a single pipeline should be less than 1
GB in size, so extend their lifetime from one day to one week as a more
reasonable compromise between availability and disk space usage.  (Note:
these jobs are also run in scheduled pipelines, but that is expected to
be acceptable in the context of artifact lifetime.)

Artifacts of the "release" jobs in GitLab CI are what we eventually
publish on the FTP server.  It happened in the past that these artifacts
were purged before we copied them to their destination, unnecessarily
prolonging the release process, even though we usually press the "Keep"
button for the "release" jobs manually to keep them around indefinitely
(as they are the source of what we publish in other places).  Since
there is only one "release" job per tag pipeline and its artifacts only
take up tens of megabytes of space, keep the artifacts of the "release"
jobs around indefinitely by default.
2023-01-27 13:25:30 +01:00
Mark Andrews
98757aaf34 Merge branch '3824-teach-danger-about-amend' into 'main'
Resolve "Teach danger about amend!"

Closes #3824

See merge request isc-projects/bind9!7430
2023-01-27 11:39:12 +00:00
Mark Andrews
9b12473292 Teach danger about amend
commit --fixup=amend:<hash> produces a subject starting with amend!
by default.  Have danger look for this to ensure that it is squashed
before merging.
2023-01-27 19:14:32 +11:00
Michal Nowak
0727c033e9 Merge branch 'mnowak/pkgdiff' into 'main'
Add release tarball comparison script

See merge request isc-projects/bind9!7419
2023-01-26 13:05:14 +00:00
Michal Nowak
5487226586 Add release tarball comparison script
The util/release-tarball-comparison.sh script compares a release-ready
BIND 9 tarball to a temporary BIND 9 tarball created from the same
signed Git tag to ensure that their content does not differ
(significantly).
2023-01-26 13:59:42 +01:00
Michał Kępień
4e934bae0b Merge tag 'v9_19_9'
BIND 9.19.9
2023-01-25 21:16:00 +01:00
Ondřej Surý
897deb69e6 Merge branch 'tt-improve-rsa-extraction' into 'main'
Improve OpenSSL RSA key extraction

See merge request isc-projects/bind9!7424
2023-01-25 19:29:23 +00:00
Timo Teräs
91c4bca866 Improve OpenSSL RSA key extraction
Add check for extracting the public 'n' component on OpenSSL 3.0
path. This is mandatory component, and it's presence is checked
already on the other code path.

Also document the reason why private key component getting errors
are ignored.
2023-01-25 21:04:27 +02:00
Ondřej Surý
cdae45e9cf Merge branch '3718-reduce-the-memory-statistics' into 'main'
Reduce the memory statistics to a bare minimum

Closes #3718

See merge request isc-projects/bind9!7412
2023-01-24 17:57:21 +00:00
Ondřej Surý
122737ace6 Add CHANGES and release note for [GL #3718] 2023-01-24 17:57:16 +00:00
Ondřej Surý
a0f322a38b Remove BlockSize from bind9.xsl
The BlockSize counter doesn't exist anymore (for some time now).
2023-01-24 17:57:16 +00:00
Ondřej Surý
3d674ccc1d Restore Malloced memory counter as InUse alias + little cleanups
This restores the Malloced memory counter and it's now always equal to
InUse counter.  This is only for backwards compatibility reason and
there is no separate counter.

The commit also cleanups little things like structure with a single
item (summary.inuse), and shuts up a wrong cppcheck warning (the
notorious NULL check after assignment).
2023-01-24 17:57:16 +00:00
Ondřej Surý
474279e5f1 Remove ContextSize memory counter
Again, this was an internal allocator counter, now it's useless.
2023-01-24 17:57:16 +00:00
Ondřej Surý
863b2b8bf3 Make the all inuse memory counter atomic operations relaxed
Instead of enforcing stronger synchronization between threads, make all
the atomic operations relaxed.  We are not really interested in exact
numbers at all times - the single place where we need the exact number
is when the memory context is being destroyed.  Even when there's a
overmem counter, we don't care about exact ordering or exact number.
2023-01-24 17:57:16 +00:00
Ondřej Surý
a08e2d37ed Cleanup the ptr argument from mem_putstats()
The ptr argument was unneeded and unused.
2023-01-24 17:57:16 +00:00
Ondřej Surý
699736b7bb Remove the Lost memory counter
The Lost memory counter would count the memory "lost" by external
libraries.  There's really no such thing as `named` require the memory
contexts to be clean on destroy.
2023-01-24 17:57:16 +00:00
Ondřej Surý
7588cd5cb1 Remove stats buckets memory counters
The stats buckets were again more useful for internal allocator, because
we would see the individual "block" caches where the allocations would
fall into.  Remove the stats buckets, and if needed, we can pull more
detailed statistics out of the jemalloc.
2023-01-24 17:57:16 +00:00
Ondřej Surý
1ea8894626 Remove the 'totalgets' memory counter
The totalgets falls into the same category as other "total" and "max"
numbers - it's just a big number with no meaning to end user.
2023-01-24 17:57:16 +00:00
Ondřej Surý
3d4e41d076 Remove the total memory counter
The total memory counter had again little or no meaning when we removed
the internal memory allocator.  It was just a monotonic counter that
would count add the allocation sizes but never subtracted anything, so
it would be just a "big number".
2023-01-24 17:57:16 +00:00
Ondřej Surý
91e349433f Remove maxinuse memory counter
The maxinuse memory counter indicated the highest amount of
memory allocated in the past. Checking and updating this high-
water mark value every time memory was allocated had an impact
on server performance, so it has been removed. Memory size can
be monitored more efficiently via an external tool logging RSS.
2023-01-24 17:57:16 +00:00
Ondřej Surý
971df0b4ed Remove malloced and maxmalloced memory counter
The malloced and maxmalloced memory counters were mostly useless since
we removed the internal allocator blocks - it would only differ from
inuse by the memory context size itself.
2023-01-24 17:57:16 +00:00
Ondřej Surý
7d8aa63026 Make {increment,decrement}_malloced() return void
The return value was only used in a single place and only for
decrement_malloced() and we can easily replace that with atomic_load().
2023-01-24 17:57:16 +00:00
Artem Boldariev
3634c4285a Merge branch 'artem-cookie-use-reuseport-socket-option-in-python-mock-server' into 'main'
Use SO_REUSEADDR for "ans9" mock server in "cookie" test

See merge request isc-projects/bind9!7418
2023-01-24 14:07:03 +00:00
Artem Boldariev
8fdf7bad76 Use SO_REUSEADDR for "ans9" mock server in "cookie" system test
This commit ensures that it is possible to run the 'cookie' test
multiple times in a row.
2023-01-24 14:39:49 +02:00
Evan Hunt
fa6801cc03 Merge branch '3797-part1-zone-task-refactoring' into 'main'
refactor zone.c to use loop callbacks

See merge request isc-projects/bind9!7365
2023-01-23 21:06:49 +00:00
Ondřej Surý
7a692cb136 Enforce receive_secure_serial() and setnsec3param() serialization
Both receive_secure_serial() and setnsec3param() run on the same zone
loop, therefore they are serialized.  Remove the mechanism to enqueue
the nsec3param and secure serial updates in case one of them is
running (as they can not) and replace it with sanity check.
2023-01-23 12:36:12 -08:00
Ondřej Surý
838850612f Replace the dns_io_t mechanism with offloaded threads
Previously, the zone loading and dumping was effectively serialized by
the dns_io_t mechanism.  In theory, more IO operations could be run in
parallel, but the zone manager .iolimit was set to 1 and never increased
as dns_zonemgr_setiolimit() was never ever called.

As the dns_master asynchronous load and dump was already offloaded to
non-worker threads with isc_work mechanism, drop the whole dns_io_t
and just rely on the isc_work to do the load and dump scheduling.
2023-01-23 12:36:07 -08:00
Evan Hunt
59f670bba9 refactor inline signing processing to use loop callbacks
receive_secure_serial() and receive_secure_db() now use
loop callbacks instead of task events.
2023-01-22 17:55:02 -08:00
Evan Hunt
ef0b126b9b refactor setnsec3param() to use loop callbacks
dynamic nsec3param update processing now uses loop callbacks
instead of task events.
2023-01-22 17:55:02 -08:00
Evan Hunt
539dc2a116 refactor asynchronous zone functions to use loop callbacks
Use loopmgr callbacks for:
- dns_zone_keydone() (also added missing documentation)
- dns_zone_setserial()
- zmgr_start_xfrin_ifquota()
2023-01-22 17:55:02 -08:00
Evan Hunt
599bdb1369 refactor dns_io to use loop callbacks
The zonemgr_getio() system now uses loopmgr callbacks instead of
task events. As zone->loadtasks is now no longer used, it has been
removed.
2023-01-22 17:55:02 -08:00
Ondřej Surý
faaf3f98d8 Merge branch '3793-fix-serialized-signing-in-dnssec-signzone' into 'main'
Refactor dnssec-signzone to use loop callbacks

Closes #3793

See merge request isc-projects/bind9!7359
2023-01-22 20:52:10 +00:00
Ondřej Surý
53e835130e Allow interrupting dnssec-signzone during signing
The signal handler in the isc_loop would wait for all the work to finish
before interrupting the signing.  Add teardown handlers via
isc_loopmgr_teardown() to signal the assignwork() it should stop signing
and bail-out early.

NOTE: The dnssec-signzone binary still can't be interrupted during zone
loading, zone cleaning, nsec(3) chain generation or zone writing.  This
might get addressed in the future if it becomes a problem.
2023-01-22 20:44:18 +01:00
Ondřej Surý
f5095e6c34 Dump the signed zone in the text format at the end of dnssec-signzone
Instead of dumping the signed zone contents node by node during the
signing, dump the entire zone at the end.  This was already done for the
raw zone format, but it shows that the IO is better utilized when the
zone dump is done in one single write rather than in small chunks.

A side effect of dumping node by node was that all names were printed
relative to the zone origin rather than being grouped under different
$ORIGINs as would normally be the case when dumping a zone. Also, state
was not maintained from one node to the next regarding whether the CLASS
has already been printed, so it was always included with the first
record of each node.

Since dnssec-signzone uses the dns_master_style_explicittl text format
style, and is the only application that does so, we can revise that
style and add a new DNS_STYLEFLAG_CLASS_PERNAME flag to get the output
back to what it was before this change.
2023-01-22 20:44:07 +01:00
Evan Hunt
a2d773fb98 Refactor dnssec-signzone to use loop callbacks
Use isc_job_run() instead of isc_task_send() for dnssec-signzone
worker threads.

Also fix the issue where the additional assignwork() would be run only
from the main thread effectively serializing all the signing.
2023-01-21 23:39:09 -08:00
Evan Hunt
630724684a Merge branch 'each-cleanup-netmgr-trace' into 'main'
complete change of NETMGR_TRACE to ISC_NETMGR_TRACE

See merge request isc-projects/bind9!7390
2023-01-20 21:12:49 +00:00
Evan Hunt
301f8b23e1 complete change of NETMGR_TRACE to ISC_NETMGR_TRACE
some references to the old ifdef were still in place.
2023-01-20 12:46:34 -08:00
Arаm Sаrgsyаn
46c0b349ed Merge branch '3726-query-forward-dot' into 'main'
Resolve "Forward queries via DoT"

Closes #3726

See merge request isc-projects/bind9!7199
2023-01-20 15:24:40 +00:00
Aram Sargsyan
73e9390715 Add CHANGES and release notes for [GL #3726] 2023-01-20 14:45:30 +00:00
Aram Sargsyan
d02be5e693 Fix nsupdate system test CA certificate signing validity days
The validity default days value of 1 was used for debugging and
left as such accidentally.

Use 10950 days, as used elsewhere (for example, in doth test CA).

This does not affect anything, the value will be effective when
generating new test certificates in the future.
2023-01-20 14:45:30 +00:00
Aram Sargsyan
154cdbd861 Test query forwarding to DoT-enabled upstream servers
Change the 'forward' system test to enable DoT on ns2 server,
and test that forwarding from ns4 to the DoT-enabled ns2 works.

In order to test different scenarios, create a test CA (based on
similar CAs for 'doth' and 'nsupdate' system tests), and test
both insecure (no certificate validation) and secure (also with
mutual TLS) TLS configurations, as well as a configuration with an
expired certificate.
2023-01-20 14:45:30 +00:00
Aram Sargsyan
6ea05ac3fe Resolver query forwarding to DoT-enabled upstream servers
Implement TLS transport usage in the resolver.

Use the configured TLS transport for the forwarders in the resolver.
2023-01-20 14:45:30 +00:00
Aram Sargsyan
3aa2d84880 Load and validate the configured TLS transport for forwarders
Add support for loading and validating the 'tls' parameter from
the forwarders' configuration.

This prepares ground for adding support to forward queries to
DoT-enabled upstream servers.
2023-01-20 14:45:30 +00:00
Aram Sargsyan
e1dd86aa07 Add 'tls' configuration support for the 'forwarders' option
A 'tls' statement can be specified both for individual addresses
and for the whole list (as a default value when an individual
address doesn't have its own 'tls' set), just as it was done
before for the 'port' value.

Create a new function 'print_rawqstring()' to print a string residing
in a 'isc_textregion_t' type parameter.

Create a new function 'copy_string()' to copy a string from a
'cfg_obj_t' object into a 'isc_textregion_t'.
2023-01-20 14:45:30 +00:00
Mark Andrews
0c14e59215 Merge branch 'marka-mock-openbsd' into 'main'
Enable mock tests for OpenBSD

See merge request isc-projects/bind9!7309
2023-01-20 13:53:16 +00:00
Mark Andrews
5c06c67001 Remove conditional around mock tests for OpenBSD
We now use multiple barriers.
2023-01-20 13:32:25 +00:00