Commit graph

37429 commits

Author SHA1 Message Date
Arаm Sаrgsyаn
ceba260fb8 Merge branch 'aram/catz-light-refactoring-and-reference-count-tracing-v9_18' into 'v9_18'
[9.18] Implement reference count tracing for dns_catz_zone_t and dns_catz_zones_t

See merge request isc-projects/bind9!7610
2023-02-28 09:49:51 +00:00
Aram Sargsyan
396265c8fa Add a CHANGES note for [GL !7570]
(cherry picked from commit c29299aa15)
2023-02-27 20:43:48 +00:00
Aram Sargsyan
f8663976ff Add reference count tracing for dns_catz_zone_t and dns_catz_zones_t
Tracing can be activated by defining DNS_RPZ_TRACE in catz.h.

(cherry picked from commit 53f0c5a9ac)
2023-02-27 20:43:48 +00:00
Aram Sargsyan
43d99eb8b8 Light refactoring of catz.c
* Change 'dns_catz_new_zones()' function's prototype (the order of the
  arguments) to synchronize it with the similar function in rpz.c.
* Rename 'refs' to 'references' in preparation of ISC_REFCOUNT_*
  macros usage for reference tracking.
* Unify dns_catz_zone_t naming to catz, and dns_catz_zones_t naming to
  catzs, following the logic of similar changes in rpz.c.
* Use C compound literals for structure initialization.
* Synchronize the "new zone version came too soon" log message with the
  one in rpz.c.
* Use more of 'sizeof(*ptr)' style instead of the 'sizeof(type_t)' style
  expressions when allocating or freeing memory for 'ptr'.

(cherry picked from commit 8cb79fec9d)
2023-02-27 20:43:48 +00:00
Arаm Sаrgsyаn
ca9bbd43c6 Merge branch '3900-catz-error-path-issues' into 'v9_18'
[9.18] Resolve "Error path cleanup issues in dns_catz_new_zones() and dns_catz_new_zone()"

See merge request isc-projects/bind9!7605
2023-02-27 14:07:34 +00:00
Aram Sargsyan
d96d8dc651 Add a CHANGES note for [GL #3900] 2023-02-27 13:21:41 +00:00
Aram Sargsyan
9050481d1f Fix a cleanup bug when isc_task_create() fails in dns_catz_new_zones()
Use isc_mem_putanddetach() instead of isc_mem_put() to detach from the
memory context.
2023-02-27 12:11:20 +00:00
Aram Sargsyan
6f8fb0241a Fix a memory leak when isc_timer_create() fails in dns_catz_new_zone()
Destroy 'new_zone->coos' in dns_catz_new_zone() on error path.
2023-02-27 12:04:01 +00:00
Mark Andrews
6c74ee2c89 Merge branch '3895-memory-leak-in-isc_hmac_init-v9_18' into 'v9_18'
[9.18] Resolve "memory leak in isc_hmac_init"

See merge request isc-projects/bind9!7604
2023-02-26 23:50:06 +00:00
Mark Andrews
749c13cf04 Fix memory leak in isc_hmac_init
If EVP_DigestSignInit failed 'pkey' was not freed.

(cherry picked from commit cf5f133679)
2023-02-27 10:27:32 +11:00
Michal Nowak
66d847ab4a Merge branch 'mnowak/freebsd-12.4-v9_18' into 'v9_18'
[9.18] Add FreeBSD 12.4

See merge request isc-projects/bind9!7599
2023-02-24 13:26:34 +00:00
Michal Nowak
d8d283bb6f
Add FreeBSD 12.4
(cherry picked from commit 2307661b1a)
2023-02-24 14:04:02 +01:00
Michal Nowak
90bdf4e95d Merge branch 'mnowak/alpine-3.17-v9_18' into 'v9_18'
[9.18] Add Alpine Linux 3.17

See merge request isc-projects/bind9!7596
2023-02-24 12:24:13 +00:00
Michal Nowak
259dd5a3ec
Drop date from "Regularly Tested Platforms" section
Changing the date is easy to forget and may be outdated.

(cherry picked from commit 5783280b10)
2023-02-24 12:47:34 +01:00
Michal Nowak
9d8fe281c3
Add Alpine Linux 3.17
(cherry picked from commit 345089ad23)
2023-02-24 12:47:33 +01:00
Michal Nowak
5ebee24dde Merge branch 'mnowak/update_TEST_PARALLEL_JOBS_for_BSD-v9_18' into 'v9_18'
[9.18] Disable OpenBSD system test parallelism in CI

See merge request isc-projects/bind9!7590
2023-02-24 09:18:24 +00:00
Michal Nowak
5f21f3203d
Disable OpenBSD system test parallelism in CI
Make OpenBSD system tests more stable by disabling parallelism in CI.

Accordingly, they will run 3-4 times longer.

(cherry picked from commit d73eba57bd)
2023-02-24 10:16:27 +01:00
Michal Nowak
ef9b15fc50
Do not set TEST_PARALLEL_JOBS in FreeBSD system test
Setting TEST_PARALLEL_JOBS to 4 in FreeBSD system test jobs is a no-op
because it's already set to 4, one level above, on the global level.

(cherry picked from commit cf46addf51)
2023-02-24 10:16:27 +01:00
Ondřej Surý
359919b326 Merge branch 'ondrej-restore-sonarcloud-analysis-v9_18' into 'v9_18'
[9.18] Add SonarCloud GitHub Action

See merge request isc-projects/bind9!7591
2023-02-24 08:56:39 +00:00
Ondřej Surý
d1213c3b99
Add SonarCloud GitHub Action
Add new SonarCloud GitHub Action and configuration; something (maybe
the way the builds were submitted) has apparently changed and the
project got deleted and the analysis wasn't working.

(cherry picked from commit 4bfbb4ddf7)
2023-02-24 09:54:20 +01:00
Tom Krizek
649e45ae00 Merge branch '3622-serve-stale-rrsig-test-v9_18' into 'v9_18'
[9.18][CVE-2022-3736] Test RRSIG queries with serve-stale enabled

See merge request isc-projects/bind9!7579
2023-02-22 13:09:08 +00:00
Mark Andrews
dfaf3b7b78
Test RRSIG queries with serve-stale enabled
Make RRSIG queries where the existing tests trigger a DNS_EVENT_TRYSTALE
event.

(cherry picked from commit add40273df)
2023-02-22 13:38:59 +01:00
Tom Krizek
c341f2fcfc Merge branch '3619-serve-stale-client-timeout-crash-test-v9_18' into 'v9_18'
[9.18][CVE-2022-3924] Add a reproducer for the serve-stale crash when recursive clients soft quota is reached

See merge request isc-projects/bind9!7576
2023-02-22 11:56:58 +00:00
Aram Sargsyan
e7f03ec3ac
Add tests for CVE-2022-3924
Reproduce the assertion by configuring a 'named' resolver with
'recursive-clients 10;' configuration option and running 20
queries is parallel.

Also tweak the 'ans2/ans.pl' to simulate a 50ms network latency
when qname starts with "latency". This makes sure that queries
running in parallel don't get served immediately, thus allowing
the configured recursive clients quota limitation to be activated.

(cherry picked from commit 4b52b0b4a9)
2023-02-22 10:50:44 +01:00
Matthijs Mekking
1d00ca2a11 Merge branch 'matthijs-fix-kasp-attach-detach-usage-v9_18' into 'v9_18'
[9.18] Fix dns_kasp_attach / dns_kasp_detach usage

See merge request isc-projects/bind9!7566
2023-02-21 16:37:55 +00:00
Mark Andrews
87602eecd7 Fix dns_kasp_attach / dns_kasp_detach usage
The kasp pointers in dns_zone_t should consistently be changed by
dns_kasp_attach and dns_kasp_detach so the usage is balanced.

(cherry picked from commit b41882cc75)
2023-02-21 16:54:53 +01:00
Arаm Sаrgsyаn
6906a0b185 Merge branch '3880-fix-rpz-assertion-failure-during-failed-reconfiguration-v9_18' into 'v9_18'
[9.18] Detach rpzs and catzs from the previous view

See merge request isc-projects/bind9!7564
2023-02-21 09:59:58 +00:00
Aram Sargsyan
2d296a8d70 Add a CHANGES note for [GL #3880]
(cherry picked from commit b086374b1d)
2023-02-21 09:05:11 +00:00
Aram Sargsyan
722b116905 Detach rpzs and catzs from the previous view
When switching to a new view during a reconfiguration (or reverting
to the old view), detach the 'rpzs' and 'catzs' from the previuos view.

The 'catzs' case was earlier solved slightly differently, by detaching
from the new view when reverting to the old view, but we can not solve
this the same way for 'rpzs', because now in BIND 9.19 and BIND 9.18
a dns_rpz_shutdown_rpzs() call was added in view's destroy() function
before detaching the 'rpzs', so we can not leave the 'rpzs' attached to
the previous view and let it be shut down when we intend to continue
using it with the new view.

Instead, "re-fix" the issue for the 'catzs' pointer the same way as
for 'rpzs' for consistency, and also because a similar shutdown call
is likely to be implemented for 'catzs' in the near future.

(cherry picked from commit 121a095a22)
2023-02-21 09:04:19 +00:00
Aram Sargsyan
568f685856 Add an "rpz" system test check for a failed reconfiguration
The faulty "DLZ" configuration triggers a reconfiguration failure
in such a place where view reverting code is covered.

(cherry picked from commit 95f4bac002)
2023-02-21 09:04:10 +00:00
Evan Hunt
64c0a7b5d4 Merge branch 'each-cleanup-gethostname-v9_18' into 'v9_18'
[9.18] Merge branch 'each-cleanup-gethostname' into 'main'

See merge request isc-projects/bind9!7559
2023-02-18 20:52:49 +00:00
Evan Hunt
61692942b8 remove named_os_gethostname()
this function was just a front-end for gethostname(). it was
needed when we supported windows, which has a different function
for looking up the hostname; it's not needed any longer.

(cherry picked from commit 197334464e)
2023-02-18 12:27:19 -08:00
Mark Andrews
833a932928 Merge branch '3879-hmac_createctx-fails-to-free-context-on-isc_hmac_init-failure-v9_18' into 'v9_18'
[9.18] Resolve "hmac_createctx fails to free context on isc_hmac_init failure"

See merge request isc-projects/bind9!7556
2023-02-18 00:50:26 +00:00
Mark Andrews
0d56344a8e In hmac_createctx free ctx on isc_hmac_init failure
(cherry picked from commit d22257a370)
2023-02-18 10:26:55 +11:00
Michal Nowak
2536012463 Merge branch 'mnowak/qa-tools-update-v9_18' into 'v9_18'
[9.18] Python formatting updates

See merge request isc-projects/bind9!7553
2023-02-17 15:32:17 +00:00
Michal Nowak
da49342f26
Fix unnecessary "else" after "raise" with pylint 2.16.2
bin/tests/system/get_algorithms.py:225:4: R1720: Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it (no-else-raise)

(cherry picked from commit 8064ac6bec)
2023-02-17 16:03:30 +01:00
Michal Nowak
d89f1056df
Adapt to Python scripts to black 23.1.0
(cherry picked from commit 3cd2cc6254)
2023-02-17 16:03:30 +01:00
Mark Andrews
af3c4ae900 Merge branch '3869-dig-fails-to-cleanup-openssl-references-v9_18' into 'v9_18'
[9.18] Resolve "Dig fails to cleanup OpenSSL references"

See merge request isc-projects/bind9!7542
2023-02-16 23:43:12 +00:00
Mark Andrews
cf5e81ed7b Cleanup OpenSSL reference on bad option
Another exit path that needs to be cleaned up.

(cherry picked from commit e27fc4bbc5)
2023-02-16 22:31:52 +00:00
Mark Andrews
4dfc183fbd Cleanup OpenSSL reference on bad domain name
Free/detach tsigkey and sig0key when exiting and then call
dst_lib_destroy if we have previously called dst_lib_init.  This will,
in theory, allow OPENSSL_cleanup to free all memory.

(cherry picked from commit 4c2525c418)
2023-02-16 22:31:52 +00:00
Michal Nowak
e48b6dfc61 BIND 9.18.12
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEIz+ZTe/bbr1Q+/5RJKPoRjruXlYFAmPc7jgACgkQJKPoRjru
 Xlb/bQ/+JEQ7B2jvP3D3Q5s58cmofBboqtMY/KxYD4kYI8IHUZBedAUN+Oud2cV1
 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YXAiuIvfGZ/lE+sza3E9V+nsM
 Fx13JNoq8/NM6cBvkOLHeCfGAaF1mhf/R8O3aAYrCYos+1GSUkMluQNZyiCgGPfm
 5oDjaDLdUAxZQKNba6p6nAaORHREeUyxMhl0ZiozeBeKEmJ+GMfFdEprEHNDVYjE
 9TNoY0S0IRXGT5FEwuclEKd8xN8NS5eBzoWrHK/75tXrSGKljs9Tvt/Ngf3A02W8
 tOatFGMiAJ8Gxy16Q87GGpd7K55PQ7k6d9UyC2g9M+rJkzhfweSGRL6dqz4o+da9
 U2NmhhQ2u95yUEqcVN+0YZKgSzZOxA+VG/FY82wB9bhnm3pE9d8JcTG75v0Q1lBv
 z3HMbZ+RxOySjj7L8vwqXES2lklb6FNZVN1yWJUJBnOgpCbKCa4=
 =HfTO
 -----END PGP SIGNATURE-----

Merge tag 'v9_18_12' into v9_18

BIND 9.18.12
2023-02-16 17:40:52 +01:00
Mark Andrews
3090062aec Merge branch 'feature/main/fips-tests-v9_18' into 'v9_18'
[9.18] FIPS tests changes for RHEL

See merge request isc-projects/bind9!7540
2023-02-15 21:56:45 +00:00
Mark Andrews
f42a203376 Add CHANGES note for [GL !7417]
(cherry picked from commit 55a6b15087)
2023-02-16 08:35:12 +11:00
Petr Menšík
0915738c46 FIPS tests changes for RHEL
Include MD5 feature detection in featuretest tool and use it in some
places. When RHEL distribution or Fedora ELN is in FIPS mode, then MD5
algorithm is unavailable completely and even hmac-md5 algorithm usage
will always fail. Work that around by checking MD5 works and if not,
skipping its usage.

Those changes were dragged as downstream patch bind-9.11-fips-tests.patch
in Fedora and RHEL.

(cherry picked from commit 6ad794a8cd)
2023-02-16 08:34:47 +11:00
Tom Krizek
d0920a91dc Merge branch '3849-relax-diff-on-dig-short-output-v9_18' into 'v9_18'
[9.18] Ignore dig errors in +short comparisons in tests

See merge request isc-projects/bind9!7532
2023-02-14 13:26:11 +00:00
Tom Krizek
df2a962284
Ignore dig errors in +short comparisons in tests
Tests using diff to compare outputs of dig +short shall ignore lines
starting with ";". In dig +short output, such lines should only be
present for errors such as network issues. Since we utilize dig's
default timeout/retry mechanisms, these transitory issues should be
ignored and only the final output should be considered during the diff
comparison.

(cherry picked from commit bd1ef66f83)
2023-02-14 13:41:06 +01:00
Arаm Sаrgsyаn
ebd49dc674 Merge branch '3866-fix-rpz-reference-counting-bug-v9_18' into 'v9_18'
[9.18] Fix RPZ reference counting error on shutdown

See merge request isc-projects/bind9!7531
2023-02-14 12:28:31 +00:00
Aram Sargsyan
e2f19d1a4b Add a CHANGES note for [GL #3866]
(cherry picked from commit a5927f1151)
2023-02-14 11:21:49 +00:00
Aram Sargsyan
aafe857e48 Fix RPZ reference counting error on shutdown
A dns_rpz_unref_rpzs() call is missing when taking the 'goto unlock;'
path on shutdown, in order to compensate for the earlier
dns_rpz_ref_rpzs() call.

Move the dns_rpz_ref_rpzs() call after the shutdown check.

(cherry picked from commit afbe63565f)
2023-02-14 11:21:40 +00:00
Arаm Sаrgsyаn
d68ef418f8 Merge branch '3735-fix-rpz-shutdown-bugs-v9_18' into 'v9_18'
[9.18] Fix shutdown and error path bugs in the rpz unit

See merge request isc-projects/bind9!7519
2023-02-14 11:19:02 +00:00