Commit Graph

36729 Commits

Author SHA1 Message Date
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
Petr Špaček
da4eae91b5 Merge branch 'pspacek/fix-out-of-tree-junit-v9_18' into 'v9_18'
Improve JUnit test status generator for Gitlab CI [v9_18]

See merge request isc-projects/bind9!6804
2022-09-22 14:36:53 +00:00
Petr Špaček
bbe089615f Unify Python interpreter used by TSAN and JUnit helpers
Reportedly we don't have python2-enabled TSAN builds, so we can remove
one more hardcoded python3 call from .gitlab-ci.yaml.

(cherry picked from commit 8d095550a8)
2022-09-22 16:17:28 +02:00
Petr Špaček
1067f114f9 Fix JUnit test status generator for out-of-tree system tests
- Use separate paths for tests results and test script
- For tarball tests include the conversion script in the `make dist`

(cherry picked from commit c46ad4aec2)
2022-09-22 16:17:25 +02:00
Arаm Sаrgsyаn
588ee1f581 Merge branch 'aram/arm-xot-and-ddns-update-forwarding-v9_18' into 'v9_18'
[v9_18] Document dynamic update forwarding limitation when XoT is enabled

See merge request isc-projects/bind9!6765
2022-09-22 11:43:53 +00:00
Aram Sargsyan
f6f828989f Add a known issue release note for [GL #3512] 2022-09-22 10:54:56 +00:00
Aram Sargsyan
e20cda5928 Document dynamic update forwarding limitation when XoT is enabled
BIND 9.18 does not support sending forwarded DDNS update requests
through DoT.
2022-09-22 10:54:56 +00:00
Evan Hunt
f05297fe5a Merge branch '3553-httpd-cleanup-v9_18' into 'v9_18'
additional code cleanups in httpd.c

See merge request isc-projects/bind9!6799
2022-09-21 20:14:31 +00:00
Evan Hunt
357b59ec68 additional code cleanups in httpd.c
- use isc_buffer functions when appropriate, rather than converting
  to and from isc_region unnecessarily
- use the zlib total_out value instead of calculating it
- use c99 struct initialization

(cherry picked from commit 4b7248545e)
2022-09-21 12:54:27 -07:00
Michał Kępień
0a53f61727 Merge tag 'v9_18_7' into v9_18
BIND 9.18.7
2022-09-21 13:13:30 +02:00
Evan Hunt
c00f22e8b2 Merge branch 'each-cleanup-dns_request-v9_18' into 'v9_18'
remove dns_request_create(), rename dns_request_createvia()

See merge request isc-projects/bind9!6784
2022-09-15 23:53:42 +00:00
Evan Hunt
8f61d07918 merge dns_request_createvia() into dns_request_create()
dns_request_create() was a front-end to dns_request_createvia() that
was only used by test binaries. dns_request_createvia() has been
renamed to dns_request_create(), and the test programs that formerly
used dns_request_create() have been updated to use the new parameters.

(cherry picked from commit ebf7b31aa3)
2022-09-15 16:49:04 -07:00
Mark Andrews
af27dd052d Merge branch '3525-key-id-clashes-across-algorithms-cause-problems-with-statistics-v9_18' into 'v9_18'
Resolve "key id clashes across algorithms cause problems with statistics" [v9_18]

See merge request isc-projects/bind9!6746
2022-09-15 23:42:39 +00:00
Mark Andrews
ea1d3476a8 Suppress manykeys test on duplicate key ids
If there are duplicate key ids across multiple algorithms expected
output is no met.  We have fixed this in on main but decided to not
back port the fix as it will change the statistics channel output.

This change detects when there are duplicate key id across algorithms
as skips the sub test.
2022-09-16 09:17:14 +10:00
Evan Hunt
9ac426db8f Merge branch '3522-update-detach-v9_18' into 'v9_18'
fix an incorrect detach in update processing

See merge request isc-projects/bind9!6782
2022-09-15 18:53:30 +00:00
Evan Hunt
16fbe33478 CHANGES for [GL #3522]
(cherry picked from commit fdc35928eb)
2022-09-15 11:34:33 -07:00
Evan Hunt
592c7b1049 fix an incorrect detach in update processing
when processing UDPATE requests, hold the request handle until
we either drop the request or respond to it.

(cherry picked from commit 00e0758e12)
2022-09-15 11:34:33 -07:00