Commit Graph

37459 Commits

Author SHA1 Message Date
Michał Kępień
ef97bf534d Add DNSRPS builds to pairwise testing
The --enable-dnsrps-dl switch for ./configure enables preparing a
DNSRPS-enabled build of BIND 9 that is not directly linked against a
DNSRPS provider library (dlopen() at runtime is used instead).  Employ
this switch to test DNSRPS-enabled builds in the pairwise testing job in
GitLab CI.

(cherry picked from commit e688ca5316)
2023-02-01 11:26:31 +01:00
Mark Andrews
feb6f768de Merge branch '3828-fuzz-dns_message_checksig-c-fails-to-call-dst_lib_destroy-v9_18' into 'v9_18'
[9.18] Call dst_lib_destroy if we have called dst_lib_init

See merge request isc-projects/bind9!7460
2023-01-31 22:15:26 +00:00
Mark Andrews
4666c2b0b2 Add CHANGES for [GL #3828]
(cherry picked from commit 13e0dfbae2)
2023-02-01 01:37:04 +11:00
Mark Andrews
0e89e18c4f Call dst_lib_destroy if we have called dst_lib_init
This returns BIGNUMs to OpenSSL allowing libcrypto to fully clean up.

(cherry picked from commit 897e0cd6f4)
2023-02-01 01:37:04 +11:00
Mark Andrews
f56de96934 Merge branch '3830-nsupdate-failed-to-handle-primary-server-address-lookup-gracefully-v9_18' into 'v9_18'
[9.18] Handle address lookup failure more gracefully

See merge request isc-projects/bind9!7458
2023-01-31 14:34:26 +00:00
Mark Andrews
819ee39129 Add CHANGES for [GL #3830]
(cherry picked from commit fda7858e74)
2023-02-01 00:36:42 +11:00
Mark Andrews
e0090d4639 Handle address lookup failure more gracefully
If the address lookup of the primary server fails just abort
the current update request rather than calling exit.  This allows
nsupdate to cleanup gracefully.

(cherry picked from commit f1387514c6)
2023-02-01 00:36:42 +11:00
Mark Andrews
5e6093210a Merge branch '3829-named-v-leaks-memory-when-shutting-down-v9_18' into 'v9_18'
[9.18] Call dns_lib_destroy in bin/named/main.c:printversion

See merge request isc-projects/bind9!7454
2023-01-30 23:32:47 +00:00
Mark Andrews
caaf6a7594 Add CHANGES for [GL #3829]
(cherry picked from commit 1d258e2fb8)
2023-01-31 10:06:02 +11:00
Mark Andrews
4263afa31d Call dns_lib_destroy in bin/named/main.c:printversion
There were unbalanced calls to dns_lib_init and dns_lib_destroy
leading to an OpenSSL memory leak.

(cherry picked from commit 8b3c018f54)
2023-01-31 10:06:02 +11:00
Ondřej Surý
198615faad Merge branch '3806-give-ADB-heap-memory-context-a-name-v9_18' into 'v9_18'
[9.18] Properly name ADB hashmap memory context

See merge request isc-projects/bind9!7448
2023-01-30 11:57:38 +00:00
Ondřej Surý
a25e41da02 Properly name ADB hashmap and named log memory contexts
The ADB hashmaps are stored in extra memory contexts, so the hash
tables are excluded from the overmem accounting.  The new memory
context was unnamed, give it a proper name.

Same thing has happened with extra memory context used for named
global log context - give the extra memory context a proper name.

(cherry picked from commit 3cda9f9f14)
2023-01-30 12:38:13 +01:00
Matthijs Mekking
dcaf8d99c3 Merge branch '3822-rndc-dnssec-checkds-force-ds-state-v9_18' into 'v9_18'
[9.18] Force set DS state after 'rndc dnssec -checkds'

See merge request isc-projects/bind9!7437
2023-01-30 10:48:21 +00:00
Matthijs Mekking
7b69792cf7 Add CHANGES for #3822
(cherry picked from commit 38ffe5acf3)
2023-01-30 09:27:38 +01:00
Matthijs Mekking
68f0fc6309 Force set DS state after 'rndc dnssec -checkds'
Set the DS state after issuing 'rndc dnssec -checkds'. If the DS
was published, it should go in RUMOURED state, regardless whether it
is already safe to do so according to the state machine.

Leaving it in HIDDEN (or if it was magically already in OMNIPRESENT or
UNRETENTIVE) would allow for easy shoot in the foot situations.

Similar, if the DS was withdrawn, the state should be set to
UNRETENTIVE. Leaving it in OMNIPRESENT (or RUMOURED/HIDDEN)
would also allow for easy shoot in the foot situations.

(cherry picked from commit ee42f66fbe)
2023-01-30 09:27:38 +01:00
Mark Andrews
699d185176 Merge branch '3824-teach-danger-about-amend-v9_18' into 'v9_18'
[9.18] Teach danger about amend

See merge request isc-projects/bind9!7439
2023-01-27 22:58:03 +00:00
Mark Andrews
8a6b78f810 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.

(cherry picked from commit 9b12473292)
2023-01-28 09:18:20 +11:00
Tom Krizek
c8232051a6 Merge branch 'tkrizek/danger-improvements-v9_18' into 'v9_18'
[9.18] danger: refine existing rules

See merge request isc-projects/bind9!7435
2023-01-27 13:51:23 +00:00
Tom Krizek
11f07ca582 danger: relax rules for single-line commits
The following are not also accepted as single-line commits without
generating warnings:
- CHANGES/release note may appear in the beginning of the commit message
- Release note may be capitalized
- Allow commits with "GL #" (e.g. Update documentation for [GL #XXXX])

(cherry picked from commit 79ae467973)
2023-01-27 14:49:29 +01:00
Tom Krizek
bc1bc38731 danger: update CHANGES rule to work with -S edition
When updating the -S edition, the CHANGES.SE file is modified. Make sure
danger accepts that.

(cherry picked from commit 1939e585c0)
2023-01-27 14:49:25 +01:00
Michał Kępień
e819d4f966 Merge branch 'michal/extend-artifact-lifetime-for-release-related-jobs-v9_18' into 'v9_18'
[9.18] Extend artifact lifetime for release-related jobs

See merge request isc-projects/bind9!7433
2023-01-27 12:31:33 +00:00
Michał Kępień
f99dd245fa 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.

(cherry picked from commit 71c9d69145)
2023-01-27 13:29:18 +01:00
Michał Kępień
8b4dcc27ef Merge tag 'v9_18_11' into v9_18
BIND 9.18.11
2023-01-25 21:26:22 +01:00
Artem Boldariev
245e4fd441 Merge branch 'artem-cookie-use-reuseport-socket-option-in-python-mock-server-v9-18' into 'v9_18'
[9.18] Use SO_REUSEADDR for "ans9" mock server in "cookie" system test

See merge request isc-projects/bind9!7421
2023-01-24 17:55:02 +00:00
Artem Boldariev
f408cacd86 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.

(cherry picked from commit 8fdf7bad76)
2023-01-24 16:05:46 +02:00
Artem Boldariev
b8c0b64995 Merge branch 'artem-fix-building-on-dragonflybsd-v9-18' into 'v9_18'
[9.18]Fix building BIND on DragonFly BSD

See merge request isc-projects/bind9!7416
2023-01-19 23:43:36 +00:00
Artem Boldariev
cb9f8c08d5 Fix building BIND on DragonFly BSD (on both older an newer versions)
This commit ensures that BIND and supplementary tools still can be
built on newer versions of DragonFly BSD. It used to be the case, but
somewhere between versions 6.2 and 6.4 the OS developers rearranged
headers and moved some function definitions around.

Before that the fact that it worked was more like a coincidence, this
time we, at least, looked at the related man pages included with the
OS.

No in depth testing has been done on this OS as we do not really
support this platform - so it is more like a goodwill act. We can,
however, use this platform for testing purposes, too. Also, we know
that the OS users do use BIND, as it is included in its ports
directory.

Building with './configure' and './configure --without-jemalloc' have
been fixed and are known to work at the time the commit is made.

(cherry picked from commit 942569a1bb)
2023-01-20 00:56:16 +02:00
Matthijs Mekking
d47890f3c8 Merge branch '3783-parental-ds-requests-need-rd-bit-set-v9_18' into 'v9_18'
[9.18] Set RD=1 on DS requests to parental-agents

See merge request isc-projects/bind9!7411
2023-01-19 15:57:35 +00:00
Matthijs Mekking
8ab8918c64 Add CHANGES and release note for GL #3783
News worthy.

(cherry picked from commit dbbacd910f)
2023-01-19 16:56:39 +01:00
Matthijs Mekking
89089817d3 Set RD bit on checkds requests
It is allowed to point parental-agents to a resolver. Therefore, the
RD bit should be set on requests.

Upon receiving a DS response, ensure that the message has either the
AA or the RA bit set.

(cherry picked from commit e34722ed43)
2023-01-19 16:56:22 +01:00
Matthijs Mekking
7ce0f7fb9e Add checkds test case with resolver parental-agent
Add a test case for a server that uses a resolver as an parental-agent.

We need two root servers, ns1 and ns10, one that delegates to the
'checkds' tld with the DS published (ns2), and one that delegates to
the 'checkds' tld with the DS removed (ns5). Both root zones are
being setup in the 'ns1/setup.sh' script.

We also need two resolvers, ns3 and ns8, that use different root hints
(one uses ns1 address as a hint, the other uses ns10).

Then add the checks to test_checkds.py is similar to the existing tests.

Update 'types' because for zones that have the DS withdrawn (or to be
withdrawn), the CDS and CDNSKEY records should not be published and
thus should not be in the NSEC bitmap.

(cherry picked from commit 0b9a9f9955)
2023-01-19 16:56:22 +01:00
Mark Andrews
5e8be202e9 Merge branch '3799-tsan-race-between-dns_rbtnode_t-bitfields-v9_18' into 'v9_18'
[9.18] Add missing node lock when setting node->wild in rbtdb.c

See merge request isc-projects/bind9!7414
2023-01-19 14:24:37 +00:00
Mark Andrews
ee5da17e13 Add CHANGES for [GL #3799]
(cherry picked from commit 5c471c5d2c)
2023-01-20 00:47:51 +11:00
Mark Andrews
4508b0a1e2 Add missing node lock when setting node->wild in rbtdb.c
The write node lock needs to be held when setting node->wild in
add_wildcard_magic except when being called from loading_addrdataset
which is used to load the zone without locking during its initial
load.

(cherry picked from commit 81c24b8da2)
2023-01-20 00:46:24 +11:00
Arаm Sаrgsyаn
feed44fd51 Merge branch '3808-refactor-isc_nm_xfr_allowed-v9_18' into 'v9_18'
[9.18] Refactor isc_nm_xfr_allowed()

See merge request isc-projects/bind9!7413
2023-01-19 13:37:24 +00:00
Aram Sargsyan
969811fc77 Add a CHANGES note for [GL #3808]
(cherry picked from commit 5a1707aa8d)
2023-01-19 12:20:10 +00:00
Aram Sargsyan
8f209c7dcf Refactor isc_nm_xfr_allowed()
Return 'isc_result_t' type value instead of 'bool' to indicate
the actual failure. Rename the function to something not suggesting
a boolean type result. Make changes in the places where the API
function is being used to check for the result code instead of
a boolean value.

(cherry picked from commit 41dc48bfd7)
2023-01-19 12:20:10 +00:00
Ondřej Surý
1f6d54d1fb Merge branch '3801-reduce-memory-bloat-caused-by-delayed-view-detach-lock-order-inversion-v9_18' into 'v9_18'
[9.18] Detach the zone views outside of the zone lock

See merge request isc-projects/bind9!7408
2023-01-19 10:00:49 +00:00
Ondřej Surý
3d3c8a935a Detach the zone views outside of the zone lock
Detaching the views in the zone_shutdown() could lead to
lock-order-inversion between adb->namelocks[bucket], adb->lock,
view->lock and zone->lock.  Detach the views outside of the section that
zone-locked.

(cherry picked from commit 978a0ef84c)
2023-01-19 10:21:19 +01:00
Ondřej Surý
579f3b66f1 Merge branch 'ondrej/replace-lgtm-with-codeql-add-python-ply-v9_18' into 'v9_18'
[9.18] Add python3-ply for ./configure to succeed on BIND 9.16 branch

See merge request isc-projects/bind9!7406
2023-01-19 09:16:37 +00:00
Ondřej Surý
a393573300 Add python3-ply to GitHub CodeQL configuration
BIND 9.16 needs Python and PLY packages for configure to succeed.
Unless we want to tweak the build script to exclude python, we need to
add python3-ply package to the CodeQL configuration.

(cherry picked from commit 0622d11366)
2023-01-19 10:12:04 +01:00
Ondřej Surý
ba1460407d Merge branch 'ondrej/replace-lgtm-with-codeql-v9_18' into 'v9_18'
[9.18] Add CodeQL GitHub Action

See merge request isc-projects/bind9!7403
2023-01-19 08:46:43 +00:00
Ondřej Surý
fd8fe4ba4e Add CodeQL GitHub Action
Replace the decommissioned LGTM service with CodeQL GitHub action.

(cherry picked from commit 77abe612a1)
2023-01-19 08:46:36 +00:00
Ondřej Surý
adfa48ed39 Merge branch '3795-speed-up-EVP_DigestInit_ex-v9_18' into 'v9_18'
[9.18] Avoid implicit algorithm fetch for OpenSSL EVP_MD family

See merge request isc-projects/bind9!7398
2023-01-18 23:33:53 +00:00
Ondřej Surý
9679417cfa Add CHANGES and release note for [GL #3795]
(cherry picked from commit 401294cf60)
2023-01-19 00:33:37 +01:00
Ondřej Surý
bf1a29e9e1 Use OpenSSL 1.x SHA_CTX API in isc_iterated_hash()
If the OpenSSL SHA1_{Init,Update,Final} API is still available, use it.
The API has been deprecated in OpenSSL 3.0, but it is significantly
faster than EVP_MD API, so make an exception here and keep using it
until we can't.

(cherry picked from commit 25db8d0103)
2023-01-19 00:33:37 +01:00
Ondřej Surý
a1dcbcab8d Use OpenSSL EVP_MD API directly in isc_iterated_hash()
Instead of going through another layer, use OpenSSL EVP_MD API directly
in the isc_iterated_hash() implementation.  This shaves off couple of
microseconds in the microbenchmark.

(cherry picked from commit 36654df732)
2023-01-19 00:32:51 +01:00
Ondřej Surý
cb4453faef Merge branch '3252-repair-isc_task_purgeevent-v9_18' into 'v9_18'
[9.18] Keep the list of scheduled events on the timer

See merge request isc-projects/bind9!7396
2023-01-18 23:32:35 +00:00
Ondřej Surý
a7e8e43829 Add CHANGES note for [GL #3252]
(cherry picked from commit a7cd0868a2)
2023-01-18 22:39:26 +01:00
Mark Andrews
80a052aaf6 Unlink the timer event before trying to purge it
as far as I can determine the order of operations is not important.

    *** CID 351372:  Concurrent data access violations  (ATOMICITY)
    /lib/isc/timer.c: 227 in timer_purge()
    221     		LOCK(&timer->lock);
    222     		if (!purged) {
    223     			/*
    224     			 * The event has already been executed, but not
    225     			 * yet destroyed.
    226     			 */
    >>>     CID 351372:  Concurrent data access violations  (ATOMICITY)
    >>>     Using an unreliable value of "event" inside the second locked section. If the data that "event" depends on was changed by another thread, this use might be incorrect.
    227     			timerevent_unlink(timer, event);
    228     		}
    229     	}
    230     }
    231
    232     void

(cherry picked from commit 98718b3b4b)
2023-01-18 22:39:26 +01:00