Commit graph

36745 commits

Author SHA1 Message Date
Petr Špaček
af5f4bacf6 Document list of crypto algorithms in named -V output
(cherry picked from commit c648e280e4)
2022-09-28 01:19:50 +10:00
Mark Andrews
70606149c6 Deduplicate string formating
(cherry picked from commit d34ecdb366)
2022-09-28 01:19:50 +10:00
Mark Andrews
2f9a504998 Add CHANGES entry for [GL #3541]
(cherry picked from commit e876de442e)
2022-09-28 01:19:50 +10:00
Mark Andrews
09910d25a9 silence scan-build false positive
(cherry picked from commit 3156d36495)
2022-09-28 01:19:50 +10:00
Mark Andrews
450a8ed5d5
Report algorithms supported by named at startup
(cherry picked from commit cb1515e71f)
2022-09-27 16:55:33 +02:00
Mark Andrews
c0e59be125
Have 'named -V' report supported algorithms
These cover DNSSEC, DS, HMAC and TKEY algorithms.

(cherry picked from commit b308f866c0)
2022-09-27 16:55:33 +02:00
Mark Andrews
3d223e0338
Replace alg_totext with dst_hmac_algorithm_totext
The new library function will be reused by subsequent commits.

(cherry picked from commit 151cc2fff9)
2022-09-27 16:55:33 +02:00
Mark Andrews
0bbc0c61e3
Convert DST_ALG defines to enum and group HMAC algorithms
The HMACs and GSSAPI are just using unallocated values.
Moving them around shouldn't cause issues.
Only the dnssec system test knew the internal number in use for hmacmd5.

(cherry picked from commit 09f7e0607a)
2022-09-27 16:55:33 +02:00
Tony Finch
57a773fa81 Merge branch '3548-without-system-jemalloc-v9_18' into 'v9_18'
A more helpful error when --without-jemalloc is impossible

See merge request isc-projects/bind9!6830
2022-09-27 14:17:36 +00:00
Tony Finch
9ec7f4399f A more helpful error when --without-jemalloc is impossible
When jemalloc is the system allocator (on FreeBSD and NetBSD), trying
to build --without-jemalloc caused an obscure compiler error. Instead,
complain at configure time that --without-jemalloc cannot work. (It
needs to remain an error because it is vexing when configure quietly
ignores an explicit direction.)

(cherry picked from commit f0e79458be)
2022-09-27 14:35:29 +01:00
Mark Andrews
6173e62147 Merge branch '3557-catalog-zone-check-key-names-v9_18' into 'v9_18'
Check that primary key names have not changed [v9_18]

See merge request isc-projects/bind9!6825
2022-09-27 12:42:23 +00:00
Mark Andrews
3fb4ced9aa Add release note for [GL #3557]
(cherry picked from commit eacf41a20a)
2022-09-27 22:20:21 +10:00
Mark Andrews
68336b367f Add CHANGES note for [GL #3557]
(cherry picked from commit 0774dacf2d)
2022-09-27 22:19:37 +10:00
Mark Andrews
66463ee48c Check that changing the TSIG key is successful
Switch the primary to require 'next_key' for zone transfers then
update the catalog zone to say to use 'next_key'.  Next update the
zones contents then check that those changes are seen on the
secondary.

(cherry picked from commit 176e172210)
2022-09-27 22:19:37 +10:00
Mark Andrews
83726e2fd3 Check that primary key names have not changed
When looking for changes in a catalog zone member zone we need to
also check if the TSIG key name associated with a primary server
has be added, removed or changed.

(cherry picked from commit 9172bd9b5a)
2022-09-27 22:19:37 +10:00
Petr Špaček
55726d616f Merge branch 'pspacek/fix-dns_message_checksig-out-of-tree-v9_18' into 'v9_18'
Fix dns_message_checksig fuzzer [v9_18]

See merge request isc-projects/bind9!6824
2022-09-27 11:37:01 +00:00
Ondřej Surý
6a349d5c29
Fix stack-use-after-scope in dns_message_checksig test
Previously stack with buffer for test dns message went out of scope
before the message was processed. For fuzz testing its better to avoid
allocation, so let's avoid allocations completely and use simplest
possible static buffer.

Fixes: #3565
(cherry picked from commit 16377100ae)
2022-09-27 13:23:25 +02:00
Petr Špaček
a24ced44ab
Fix dns_message_checksig in out-of-tree setup
Hardcoded path was missing FUZZDIR prefix.

Related: !5923
(cherry picked from commit 4108d79c9a)
2022-09-27 13:23:25 +02:00
Petr Špaček
35c5853f8a
Detect errors in fuzzer initialization
Incomplete initialization typically causes mysterious failures later on,
so let's err out early.

(cherry picked from commit d102c59b96)
2022-09-27 13:23:16 +02:00
Evan Hunt
a44ccdbabb Merge branch '3553-static-buffer-functions-v9_18' into 'v9_18'
change ISC__BUFFER macros to inline functions

See merge request isc-projects/bind9!6819
2022-09-27 07:46:00 +00:00
Evan Hunt
369858730a change ISC__BUFFER macros to inline functions
previously, when ISC_BUFFER_USEINLINE was defined, macros were
used to implement isc_buffer primitives (isc_buffer_init(),
isc_buffer_region(), etc). these macros were missing the DbC
assertions for those primitives, which made it possible for
coding errors to go undetected.

adding the assertions to the macros caused compiler warnings on
some platforms. therefore, this commit converts the ISC__BUFFER
macros to static inline functions instead, with assertions included,
and eliminates the non-inline implementation from buffer.c.

the --enable-buffer-useinline configure option has been removed.

(cherry picked from commit 1926ddc987)
2022-09-27 00:45:28 -07:00
Michał Kępień
e442730104 Merge branch 'mnowak/add-fedora-36-v9_18' into 'v9_18'
[v9_18] Add Fedora 36

See merge request isc-projects/bind9!6820
2022-09-27 07:42:14 +00:00
Michal Nowak
50405ba413 Add Fedora 36
(cherry picked from commit a313c49a3b)
2022-09-27 09:40:19 +02:00
Petr Špaček
b8c92ad51f Merge branch 'bug/main/doc-arm-rhel9-v9_18' into 'v9_18'
Compatibility for building ARM on older sphinx [v9_18]

See merge request isc-projects/bind9!6817
2022-09-26 15:23:34 +00:00
Petr Menšík
ad59ef103f
Simplify allowing warnings during ARM build
RHEL8 Sphinx does not support all features used in ARM building. But
with few emitted warnings it can build the documentation fine. Simplify
warnings acceptance by allowing make doc SPHINX_W=''.

(cherry picked from commit 3db7e241d2)
2022-09-26 17:16:42 +02:00
Petr Menšík
dfc7b630db
Compatibility for building ARM on older sphinx
Make documentation building successful even on RHEL9 sphinx 3.4.3. It
does not like case-insensitive matching of terms, so provide lowercase
text description with Uppercase word reference.

(cherry picked from commit bc6c6b1184)
2022-09-26 17:16:38 +02:00
Petr Špaček
98ba68fe02 Merge branch 'ondrej-add-dns_message_checktsig-fuzzer-v9_18' into 'v9_18'
Add dns_message_checksig() fuzzer [v9_18]

See merge request isc-projects/bind9!6816
2022-09-26 15:16:01 +00:00
Petr Špaček
c00f76b37e
Add seed to reproduce issue memory leak in dns_message_checktsig
Related: #3547
(cherry picked from commit 983822abcf)
2022-09-26 16:53:06 +02:00
Mark Andrews
431a2159e5
Add CHANGES notes for [GL !5923]
(cherry picked from commit 6237273205)
2022-09-26 16:53:06 +02:00
Mark Andrews
339bd12c88
Add the ability to dig to specify the signing time
(cherry picked from commit 805e2ba31d)
2022-09-26 16:53:06 +02:00
Mark Andrews
86fc284f74
Allow dig to SIG(0) sign a message
(cherry picked from commit 4d248ee78e)
2022-09-26 16:53:06 +02:00
Mark Andrews
3a3a6367d2
Add a SIG(0) request seed
(cherry picked from commit c127a2aefc)
2022-09-26 16:53:06 +02:00
Mark Andrews
ed307fa179
Add TSIG reply seed
(cherry picked from commit 3c28608c9f)
2022-09-26 16:53:06 +02:00
Mark Andrews
5eae4b78cc
Add TSIG request seed
(cherry picked from commit f3d47bc8e0)
2022-09-26 16:53:06 +02:00
Ondřej Surý
e57b933fbe
Add dns_message_checksig() fuzzer
dns_message_checksig is called in a number of scenarios

	* on requests and responses
	* on multiple opcodes
	* with and without signatures
	* with TSIG signatures
	* with SIG(0) signatures
	* with and without configured TSIG keys
	* with and without KEY records being present
	* signing performed now, in the future and in the past

we use the first two octets of the seed to configure the calling
environment with the remainder of the seed being the rdata of the
TSIG/SIG(0) record.

(cherry picked from commit 4da0180ba2)

Adapted to v9_18 - removed third dns_zone_create() parameter.
2022-09-26 16:53:06 +02:00
Ondřej Surý
c66c687bd6
Add the ability specify the signing / verification time
When fuzzing it is useful for all signing operations to happen
at a specific time for reproducability.  Add two variables to
the message structure (fuzzing and fuzztime) to specify if a
fixed time should be used and the value of that time.

(cherry picked from commit 3e85d8c3d6)
2022-09-26 16:30:36 +02:00
Petr Špaček
c460041ad1 Merge branch '3547-dns_message_checksig-leak-fix-v9_18' into 'v9_18'
Fix memory leak in dns_message_checksig() - SIG(0) sigs [v9_18]

See merge request isc-projects/bind9!6812
2022-09-26 10:44:51 +00:00
Mark Andrews
1488ef19f8
Stop passing mctx to dns_rdata_tostruct as it is unnecessary for SIG
dns_rdata_tostruct doesn't need a mctx passed to it for SIG (the signer
is already expanded at this point). About the only time when mctx is
needed is when the structure is to be used after the rdata has been
destroyed.

(cherry picked from commit d6ad56bd9e)
2022-09-26 12:01:44 +02:00
Petr Špaček
9a971bb8b0
Fix memory leak in dns_message_checksig() - SIG(0) sigs
Impact should be visible only in tests or tools because named never
uses view == NULL, which is a necessary condition to trigger this leak.

(cherry picked from commit 69256b3553)
2022-09-26 12:01:40 +02:00
Mark Andrews
dc9c5f5cbd Merge branch 'bug/main/sha1-disabled-fedora-rhbz2122841-v9_18' into 'v9_18'
Engine pkcs11 cannot work with OSSL_PARAM on OpenSSL 3.0 [v9_18]

See merge request isc-projects/bind9!6805
2022-09-23 04:26:58 +00:00
Mark Andrews
b53b69ca3c Add release note for [GL !6711]
(cherry picked from commit e27b063f67)
2022-09-23 14:07:53 +10:00
Mark Andrews
e24c1f54ff Add a CHANGES note for [GL !6711]
(cherry picked from commit 54916b4e45)
2022-09-23 14:07:51 +10:00
Mark Andrews
ebe0f68e99 Report how named was built
(cherry picked from commit 979062ee5d)
2022-09-23 14:07:21 +10:00
Mark Andrews
103b6948fb Build against OpenSSL 3.0 in OpenSSL 1.1.0 compatibility mode
(cherry picked from commit 9b13dd7b4d)
2022-09-23 14:07:21 +10:00
Michal Nowak
c59c904e11 Let Debian sid image leverage PKCS#11 with OpenSSL 3
(cherry picked from commit 3dec2deebc)
2022-09-23 14:07:21 +10:00
Mark Andrews
98cc24d9fe Update reference to point to doc/arm/build.inc.rst
(cherry picked from commit 6d668b8c34)
2022-09-23 14:07:21 +10:00
Mark Andrews
7b2236c431 Document -DOPENSSL_API_COMPAT=10100 in OPTIONS.md
(cherry picked from commit f32c52c5ca)
2022-09-23 14:07:21 +10:00
Petr Menšík
8a425dbac4 Remove engine related parts for OpenSSL 3.0
OpenSSL just cannot work with mixing ENGINE_* api mixed with OSSL_PARAM
builders. But it can be built in legacy mode, where deprecated but still
working API would be used.

It can work under OpenSSL 3.0, but only if using legacy code paths
matching OpenSSL 1.1 calls and functions.

Remove fromlabel processing by OpenSSL 3.0 only functions. They can
return later with a proper provider support for pkcs11.

(cherry picked from commit 6c55ea17c6)
2022-09-23 14:07:21 +10:00
Petr Menšík
d6806c9fe7 Do not use OSSL_PARAM when engine API is compiled
OpenSSL has deprecated many things in version 3.0. If pkcs11 engine
should work then no builder from OpenSSL 3.0 API can be used.

Allow switching to OpenSSL 1.1 like calls even on OpenSSL 3.0 when
OPENSSL_API_COMPAT=10100 is defined. It would still compile and allow
working keys loading from the engine passed on command line.

(cherry picked from commit f92950bb64)
2022-09-23 14:07:14 +10:00
Petr Menšík
306f1008cc Add ENGINE_init and ENGINE_finish calls
According to manual page of ENGINE_init, it should be called explicitly
before any key operations happens. Make it active whole lifetime.

(cherry picked from commit 71a8f1e7cd)
2022-09-23 14:05:16 +10:00