Commit graph

39703 commits

Author SHA1 Message Date
Timo Teräs
628dd278d3 Rework opensslecdsa_link to handle legacy key objects w/ openssl3
Due to bug in openssl3, the pkcs11-engine is made the default
provider if enabled. This causes key generation and load to
return legacy objects.

Openssl3 has limited glue and does not support the full set
of new style parameter to be inqueried from legacy key objects

Rewrite required functions to use first the new API (if available),
but fallback to the old API (if available). For the methods that
have proper OpenSSL compatiblity glue, ship only one version.
2023-08-25 14:59:16 +03:00
Arаm Sаrgsyаn
edd9925e44 Merge branch '4273-streamdns-eagain' into 'main'
Resolve "crash while receiving 64 kiB message over TCP"

Closes #4273

See merge request isc-projects/bind9!8231
2023-08-24 12:43:31 +00:00
Aram Sargsyan
a33dc921dc Fix a condition in isc_dnsstream_assembler_incoming()
Before calling isc_buffer_putmem(), there is a condition to check
that 'buf_size' is greater than 0. At this point 'buf_size' is
guaranteed to be greater than zero, so either the condition is
redundant, or 'unprocessed_size' should be checked instead, which
seems more logical, because calling isc_buffer_putmem() with
'unprocessed_size' being zero is not useful, although harmless.
2023-08-24 11:59:57 +00:00
Aram Sargsyan
9a271371d3 Handle cases when buf_size is zero
The isc_dnsstream_assembler_incoming() inline function expects that
when 'buf_size' is zero, then 'buf' must be NULL. The expectation is
not correct, because those values come from the libuv read callback,
and its documentation notes[1] that 'nread' ('buf_size' here) might
be 0, which does not indicate an error or EOF, but is equivalent to
EAGAIN or EWOULDBLOCK under read(2).

Change the isc_dnsstream_assembler_incoming() inline function to
remove the invalid expectation.

[1] https://docs.libuv.org/en/v1.x/stream.html#c.uv_read_cb
2023-08-24 11:59:57 +00:00
Aram Sargsyan
4d723c76b1 Add a a tcp system test case
The new test sends a 64 KiB message over TCP to named, and expects
it to handle it correctly.
2023-08-24 11:59:57 +00:00
Ondřej Surý
6b1ed14f17 Merge branch 'ondrej/remove-i386-as-fully-supported-platform' into 'main'
Move i386 and armhf to the Best-Effort category

See merge request isc-projects/bind9!8223
2023-08-23 14:55:14 +00:00
Ondřej Surý
db94c7526c
Split the CPU architectures into more categories
Move i386 and other less common or ancient CPU architectures to
Community-Maintened category.  Move armhf and arm64 to the Best-Effort
category as we do test them as part of development work (new MacBooks
are all arm64), we don't really do full set of tests in the CI.
2023-08-23 16:54:22 +02:00
Ondřej Surý
dda021281a Merge branch 'ondrej-cleanup-qp-in-forwarders' into 'main'
Refactor cleanup code in the qp-trie for the forwarders table

See merge request isc-projects/bind9!8212
2023-08-23 13:50:03 +00:00
Ondřej Surý
2e3eae6b91
Refactor cleanup code in the qp-trie for the forwarders table
Instead of duplicating the destroy_forwarders() code in the cleanup
sections, just call dns_forwarders_detach() every time - in case of
failure, the forwarders aren't going to be attached, and forwarders
object will be destroyed right away.
2023-08-23 15:49:17 +02:00
Ondřej Surý
01c758ea3a Merge branch 'ondrej-cleanup-mem-macros' into 'main'
Remove some unnecessary token pasting macrology

See merge request isc-projects/bind9!8236
2023-08-23 12:50:08 +00:00
Tony Finch
6271f3c054
Fix the style of an array de-allocation in dnssec-cds
Mention the element size explicitly, so that `matching_sigs()`,
`signed_loose()`, and `signed_strict()` use the same calculation.
2023-08-23 14:49:15 +02:00
Tony Finch
1d341096c1
Get rid of unnecessary macros in the system test dyndb driver
CHECKED_MEM_GET and ZERO_PTR are built-in features of isc_mem.
2023-08-23 14:49:15 +02:00
Tony Finch
52fcc9fc0f
Remove some unnecessary token pasting macrology
There used to be an extra layer of indirection in the memory functions
for certain dynamic linking scenarios. This involved variant spellings
like isc__mem and isc___mem. The isc___mem variants were removed in
commit 7de846977b so the token pasting is no longer needed and
only serves to obfuscate.
2023-08-23 14:49:15 +02:00
Tom Krizek
911dd7fa36 Merge branch '3001-pytest-nitpicks' into 'main'
system tests stability tweaks and cleanup

Closes #3001

See merge request isc-projects/bind9!8239
2023-08-23 12:48:58 +00:00
Tom Krizek
40289d5440
Allow re-runs of rrl system test
The rrl system test has been unstable and producing false positive
results for years (GL #172). Allow the test to be re-run (once) to
reduce the noise it causes.
2023-08-23 14:06:20 +02:00
Tom Krizek
8c5833fe39
Allow re-runs of reclimit system test
The reclimit system test has been unstable and producing false positive
results for years (GL #1587). Allow the test to be re-run (once) to
reduce the noise it causes.
2023-08-23 14:06:20 +02:00
Tom Krizek
be2123a8e9
Allow re-runs of qmin system test
The qmin test is inherently unstable. It fails quite often with failure
modes described in GL #904. Allow the pytest runner to re-run the test
up to 3 times to only detect a more persistent and reproducible failures
rather than random noise caused by the nature of the test.
2023-08-23 14:06:20 +02:00
Tom Krizek
7522583b57
Disable loadtime check in statschannel test
It is better to disable the specific check that causes the test to fail
rather than mark the entire test as xfail, which can mask other issues
which the test is capable of detecting.
2023-08-23 14:06:20 +02:00
Tom Krizek
86043b0bbe
ci: fix after_script for out-of-tree tests
The commands in after_script run in a new shell, separate from
before_script and script commands. Since the pytest.log.txt is for out
of tree tests is present in the build directory, switch to it (if set)
before running any postprocessing commands.
2023-08-23 14:06:20 +02:00
Tom Krizek
1b3db25adf
Clean up pytest .gitignore file
The _last_test_run entry was accidentally added in !8194. It came from a
work-in-progress version of the MR and was left there during a rebase.
2023-08-23 14:06:20 +02:00
Tom Krizek
0361233b3d
Skip checkds test on Python<3.7
checkds test requires the capture_output argument for subprocess.run()
which was added in Python 3.7.
2023-08-23 14:06:18 +02:00
Ondřej Surý
a0801963ad Merge branch '4271-disable-DTrace-in-FIPS-jobs' into 'main'
Disable tracing in the FIPS enabled builds

Closes #4271

See merge request isc-projects/bind9!8235
2023-08-23 09:07:05 +00:00
Ondřej Surý
a80608200d
Disable tracing in the FIPS enabled builds
The dtrace command fails with segmentation fault in the FIPS-enabled
builds, thus we need to disable the tracing in the CI for the FIPS
jobs.
2023-08-23 11:06:14 +02:00
Matthijs Mekking
39490eccaf Merge branch '1181-nsupdate-tcp-soa-requests-main' into 'main'
Don't do TCP SOA requests for default servers

Closes #1181

See merge request isc-projects/bind9!8192
2023-08-23 08:29:08 +00:00
Matthijs Mekking
4249ebd92f Add release note and CHANGES for #1181 2023-08-23 09:56:57 +02:00
Matthijs Mekking
6502240442 Don't do DoT SOA requests for default servers
Default servers usually don't have DoT set up. Only do SOA queries if
the server is specified.
2023-08-23 09:56:38 +02:00
Ondřej Surý
6c4af7ca40 Merge branch '4275-DTrace-on-macOS-only-needs-header' into 'main'
Don't generate the probes.lo on macOS

Closes #4275

See merge request isc-projects/bind9!8234
2023-08-23 06:59:50 +00:00
Ondřej Surý
3b6db95e70 Regenerate the DTrace generated files on configure change
The DTrace generated files were missing dependency on the Makefile, so
they didn't get regenerated when ./configure was re-run.  This would
create problem especially between ./configure --enable-tracing vs
./configure --disable-tracing invocations.
2023-08-23 07:40:20 +02:00
Ondřej Surý
d13ea59a3c Don't generate the probes.lo on macOS
The DTrace on macOS only needs header file and the dtrace command
doesn't have the -G option.  Skip generating the object file on macOS,
so the build doesn't fail.
2023-08-23 07:33:50 +02:00
Evan Hunt
b4a3b133cc Merge branch '3835-cname-wildcard-loop-followup' into 'main'
prevent query_coveringnsec() from running twice

See merge request isc-projects/bind9!8214
2023-08-21 21:29:56 +00:00
Evan Hunt
ba1f75684f CHANGES for [GL #3835] 2023-08-21 12:23:08 -07:00
Evan Hunt
0ae8b2e056 prevent query_coveringnsec() from running twice
when synthesizing a new CNAME, we now check whether the target
matches the query already being processed. if so, we do not
restart the query; this prevents a waste of resources.
2023-08-21 12:22:47 -07:00
Tom Krizek
344f0bb7ce Merge branch '4249-compile-test-files-during-make' into 'main'
Compile system test binaries during make

Closes #4249

See merge request isc-projects/bind9!8189
2023-08-21 19:13:13 +00:00
Tom Krizek
0422415500
ci: Disable dnsrps for respdiff jobs compiled with ASAN/TSAN
The dnsrps build assumes that dlopen is available from libc. This
assumption isn't met when attempting to build with address or thread
sanitizer on debian (bullseye, bookworm). Disable dnsrps build to avoid
the issue, since it's not needed anyway for our respdiff tests.

See commit b396f55586 for more info about
the dnsrps build.
2023-08-21 20:04:50 +02:00
Tom Krizek
145bec51a0
Resolve scan-build issue in dummylib.c
Value stored to 'rdatap' is never read. Remove the line which has no
effect.
2023-08-21 20:04:50 +02:00
Tom Krizek
21980b43b8
Compile system test binaries during make
Using check_PROGRAMS would postpone compiling the binaries needed by
system tests until `make check` would be called. Since it's preferable
to invoke pytest directly to run the system test suite, compile these
binaries without installing them during `make all` instead by using
noinst_PROGRAMS.

This removes the need to use TESTS= make -e check hack invoked from
pytest to work around this issue.
2023-08-21 20:04:48 +02:00
Ondřej Surý
664d7c642d Merge branch '4041-add-userspace-tracing' into 'main'
Add support for userspace tracing via USDT

Closes #4041

See merge request isc-projects/bind9!7872
2023-08-21 18:04:05 +00:00
Ondřej Surý
52cabc662f
Add CHANGES and release note for [GL #4041] 2023-08-21 18:39:53 +02:00
Ondřej Surý
9b858769dc
Add zone name to the LIBDNS_XFRIN probes
We already print the formatted zone name via the xfrin_log() function,
generate the text once and store it in xfr->info static buffer.  Then we
can reuse the string to pass it to the LIBDNS_XFRIN probes.
2023-08-21 18:39:53 +02:00
Ondřej Surý
d332f07f38
Add a probe when the response rate limiting drops or slips query
Add a trace point that would report when a query gets dropped or slipped
by rate limits. It reports the client IP, the zone, and the RRL result
code.

Co-authored-by: Paul Frieden <pfrieden@yahooinc.com>
2023-08-21 18:39:53 +02:00
Ondřej Surý
96ccba5d51
Add tracing probes to the dns_xfrin unit
Add tracing probes to incoming transfers, so we can accurately measure
the individual events when sending, receiving and parsing the incoming
transfers.
2023-08-21 18:39:53 +02:00
Ondřej Surý
2484a3702a
Add tracing probes to the isc_job unit
Add tracing probes to isc_job unit:

 * libisc:job_cb_before - before the job callback is called
 * libisc:job_cb_after - after the job callback is called
2023-08-21 18:39:53 +02:00
Ondřej Surý
dcd60215ac
Add tracing probes to the custom isc_rwlock implementation
Add tracing probes to ISC own isc_rwlock implementation to allow
fine-grained tracing.  The pthread rwlock already has probes inside
glibc, and it's difficult to add probes to headers included from the
other libraries.
2023-08-21 18:39:53 +02:00
Ondřej Surý
784d055809
Add support for User Statically Defined Tracing (USDT) probes
This adds support for User Statically Defined Tracing (USDT).  On
Linux, this uses the header from SystemTap and dtrace utility, but the
support is universal as long as dtrace is available.

Also add the required infrastructure to add probes to libisc, libdns and
libns libraries, where most of the probes will be.
2023-08-21 18:39:53 +02:00
Michal Nowak
1e16d41446 Merge branch '3893-make-debian-12-bookworm-base-image' into 'main'
Make Debian 12 "bookworm" the base image

See merge request isc-projects/bind9!8075
2023-08-21 15:19:49 +00:00
Michal Nowak
077d82403e
Move clang:bullseye PKCS11 testing to gcc:bullseye
Move clang:bullseye:amd64 PKCS11 testing to the gcc:bullseye:amd64 job
to evenly represent compilers in PKCS11 testing.
2023-08-21 16:35:52 +02:00
Michal Nowak
55f5aa08f0
Drop unnecessary gcovr workarounds
Many problems of the Debian 11 gcovr version were fixed in the Debian 12
one. Replace workarounds we accumulated over the years with two new,
simple ones.
2023-08-21 16:35:52 +02:00
Michal Nowak
cfb06dabfe
Drop PKCS11 testing from "sid", restore it on "clang:bookworm"
The gcc:sid:amd64 job was used to test PKCS11 via the OpenSSL engine API
but is now designated for future PKCS11 testing via the provider API.

The ability to use PKCS11 via engine API in clang:bookworm:amd64 has
been restored using only deprecated APIs in OpenSSL 3.
2023-08-21 16:35:52 +02:00
Michal Nowak
7929168295
Disable mandoc stylistic warning
We are not concerned by the "input text line longer than 80 bytes"
stylistic warning.
2023-08-21 16:35:52 +02:00
Michal Nowak
a330ab221e
Drop unneeded -Wno-compound-token-split-by-macro option
Debian 12 has Perl 5.36 and the option is no longer needed.
2023-08-21 16:35:52 +02:00