Commit Graph

32796 Commits

Author SHA1 Message Date
Michal Nowak
382ace6db6 Add system test name to "file not removed" info
(cherry picked from commit 10bf725ee2)
2021-02-18 08:20:54 +01:00
Michał Kępień
e7cdb6eb9b Merge branch 'v9_16_12-release' into 'v9_16'
Merge 9.16.12 release branch

See merge request isc-projects/bind9!4700
2021-02-17 21:48:47 +00:00
Michał Kępień
f08646ea4d Set up release notes for BIND 9.16.13 2021-02-17 22:39:53 +01:00
Tinderbox User
9148895f56 Merge branch 'prep-release' into security-v9_16 2021-02-17 22:36:08 +01:00
Michał Kępień
eafb2ae202 Merge branch 'michal/prepare-documentation-for-bind-9.16.12' into 'security-v9_16'
Prepare documentation for BIND 9.16.12

See merge request isc-private/bind9!240
2021-02-17 22:36:08 +01:00
Tinderbox User
2ffb627d30 prep 9.16.12 2021-02-17 22:36:08 +01:00
Michał Kępień
4f5c5c67ee Merge branch '2354-security-off-by-one-error-in-spnego-v9_16' into 'security-v9_16'
[v9_16] [CVE-2020-8625] Fix off-by-one bug in ISC SPNEGO implementation

See merge request isc-private/bind9!235
2021-02-17 22:36:08 +01:00
Michał Kępień
84708ad977 Prepare release notes for BIND 9.16.12 2021-02-17 22:36:08 +01:00
Ondřej Surý
55e103dfe0 Add CHANGES and release note for GL #2354 2021-02-17 22:36:08 +01:00
Michał Kępień
996c9135ca Add release note for GL #2073 2021-02-17 22:36:08 +01:00
Ondřej Surý
b04cb88462 Fix off-by-one bug in ISC SPNEGO implementation
The ISC SPNEGO implementation is based on mod_auth_kerb code.  When
CVE-2006-5989 was disclosed, the relevant fix was not applied to the
BIND 9 codebase, making the latter vulnerable to the aforementioned flaw
when "tkey-gssapi-keytab" or "tkey-gssapi-credential" is set in
named.conf.

The original description of CVE-2006-5989 was:

    Off-by-one error in the der_get_oid function in mod_auth_kerb 5.0
    allows remote attackers to cause a denial of service (crash) via a
    crafted Kerberos message that triggers a heap-based buffer overflow
    in the component array.

Later research revealed that this flaw also theoretically enables remote
code execution, though achieving the latter in real-world conditions is
currently deemed very difficult.

This vulnerability was responsibly reported as ZDI-CAN-12302 ("ISC BIND
TKEY Query Heap-based Buffer Overflow Remote Code Execution
Vulnerability") by Trend Micro Zero Day Initiative.
2021-02-17 22:36:08 +01:00
Michał Kępień
3bfc7756e4 Reorder release notes 2021-02-17 22:36:08 +01:00
Michał Kępień
70d8f9182c Tweak and reword release notes 2021-02-17 22:36:08 +01:00
Michał Kępień
6141505a72 Tweak and reword recent CHANGES entries 2021-02-17 22:36:08 +01:00
Michał Kępień
dcf5204f7a Use :rfc:<number> references in release notes 2021-02-17 22:36:08 +01:00
Ondřej Surý
9c90c95774 Merge branch '2487-rollback-setting-dontfrag-option-v9_16' into 'v9_16'
Rollback setting IP_DONTFRAG option on the UDP sockets (v9.16)

See merge request isc-projects/bind9!4697
2021-02-17 14:25:38 +00:00
Ondřej Surý
c1292e126f Add CHANGES and release notes for GL #2487
(cherry picked from commit 6d442e9c04)
2021-02-17 14:42:53 +01:00
Ondřej Surý
d7b3a6a016 Rollback setting IP_DONTFRAG option on the UDP sockets
In DNS Flag Day 2020, the development branch started setting the
IP_DONTFRAG option on the UDP sockets.  It turned out, that this
code was incomplete leading to dropping the outgoing UDP packets.
Henceforth this commit rolls back this setting until we have a
proper fix that would send back empty response with TC flag set.

(cherry picked from commit 66eefac78c)
2021-02-17 14:41:56 +01:00
Michal Nowak
d997a5f1f2 Merge branch 'mnowak/enable-dh-unit-test-to-run-under-pkcs11-v9_16' into 'v9_16'
[v9_16] Drop USE_OPENSSL constraint from dh_test

See merge request isc-projects/bind9!4696
2021-02-17 11:54:23 +00:00
Michal Nowak
f483b102dd Drop USE_OPENSSL constraint from dh_test
The USE_OPENSSL constraint in dh_test does not seems to be necessary
anymore, the test runs with PKCS#11 as well.

(cherry picked from commit c341e7f740)
2021-02-17 12:46:25 +01:00
Michal Nowak
1378c88784 Merge branch 'mnowak/consistent-use-of-SKIPPED_TEST_EXIT_CODE-v9_16' into 'v9_16'
[v9_16] Ensure dnstap_test returns SKIPPED_TEST_EXIT_CODE

See merge request isc-projects/bind9!4686
2021-02-17 11:21:04 +00:00
Michal Nowak
ed38e32b69 Ensure dnstap_test returns SKIPPED_TEST_EXIT_CODE
Make sure lib/dns/tests/dnstap_test returns an exit code that indicates
a skipped test when dnstap is not enabled.

(cherry picked from commit c286341703)
2021-02-17 12:15:18 +01:00
Michal Nowak
4e00019644 Merge branch 'mnowak/merge-skipped-and-untested-system-test-results-v9_16' into 'v9_16'
[v9_16] Merge UNTESTED and SKIPPED system test results

See merge request isc-projects/bind9!4681
2021-02-17 11:15:05 +00:00
Michal Nowak
4d57587528 Add CHANGES note for [GL !4517]
(cherry picked from commit 3cc3f1712b)
2021-02-17 12:09:25 +01:00
Michal Nowak
04aff208fb Use BIND 9.17 preprocessor macro to skip unit test
BIND 9.17 changed exit code of skipped test to meet Automake
expectations in fa505bfb0e. BIND 9.16 was
not rewritten to Automake, but for consistency reasons, the same
SKIPPED_TEST_EXIT_CODE preprocessor macro is used (though the actual
exit code differs from the one in BIND 9.17).

(cherry picked from commit fa505bfb0e)
2021-02-17 12:09:25 +01:00
Michal Nowak
59499ecc3a Merge UNTESTED and SKIPPED system test results
Descriptions of UNTESTED and SKIPPED system test results are very
similar to one another and it may be confusing when to pick one and
when the other. Merging these two system test results removes the
confusion.

(cherry picked from commit 29d7c6e449)
2021-02-17 12:06:33 +01:00
Evan Hunt
3f7959b1d5 Merge branch 'each-note-cleanup-v9_16' into 'v9_16'
some release note corrections

See merge request isc-projects/bind9!4692
2021-02-17 01:04:18 +00:00
Evan Hunt
df541c63c6 some release note corrections
(cherry picked from commit 3126eb652d)
2021-02-16 17:00:21 -08:00
Mark Andrews
aba3053409 Merge branch '2402-bind-9-16-11-build-fails-with-static-openssl-library-v9_16' into 'v9_16'
Resolve "BIND 9.16.11 build fails with static OpenSSL library"

See merge request isc-projects/bind9!4691
2021-02-17 00:27:12 +00:00
Mark Andrews
21de92f2cd Add CHANGES for [GL #2402]
(cherry picked from commit 98dc47d351)
2021-02-17 10:38:26 +11:00
Mark Andrews
0bcf09fe45 Fix linking order for OpenSSL libraries
As libssl depends on libcrypto, -lssl needs to precede -lcrypto in
linker invocations or else the build will fail with static OpenSSL
libraries.  Adjust m4/ax_check_openssl.m4 to prevent this issue from
getting triggered when pkg-config files for OpenSSL are not available.

(cherry picked from commit 9223c7d599)
2021-02-17 10:38:25 +11:00
Ondřej Surý
24ed8d78e2 Merge branch '2357-cannot-compile-current-versions-on-macos-catalina' into 'v9_16'
Resolve "Cannot compile current versions on macOS "Catalina""

See merge request isc-projects/bind9!4508
2021-02-16 12:21:07 +00:00
Mark Andrews
d51b78c85b Stop including <gssapi.h> from <dst/gssapi.h> header
The only reason for including the gssapi.h from the dst/gssapi.h header
was to get the typedefs of gss_cred_id_t and gss_ctx_id_t.  Instead of
using those types directly this commit introduces dns_gss_cred_id_t and
dns_gss_ctx_id_t types that are being used in the public API and
privately retyped to their counterparts when we actually call the gss
api.

This also conceals the gssapi headers, so users of the libdns library
doesn't have to add GSSAPI_CFLAGS to the Makefile when including libdns
dst API.
2021-02-16 12:08:21 +11:00
Ondřej Surý
4bbe3e75de Stop including dnstap headers from <dns/dnstap.h>
The <fstrm.h> and <protobuf-c/protobuf-c.h> headers are only directly
included where used and we stopped exposing those headers from libdns
headers.
2021-02-16 12:08:21 +11:00
Mark Andrews
bf5aac225b Stop including <lmdb.h> from <dns/lmdb.h>
The lmdb.h header doesn't have to be included from the dns/lmdb.h
header as it can be separately included where used.  This stops
exposing the inclusion of lmdb.h from the libdns headers.
2021-02-16 12:08:21 +11:00
Mark Andrews
b8fc8742e5 Re-order include directories
${FSTRM_CFLAGS} ${PROTOBUF_C_CFLAGS} ${OPENSSL_CFLAGS} ${LMDB_CFLAGS}
need to appear after all directories in the build tree.
2021-02-16 12:08:21 +11:00
Diego dos Santos Fronza
f24ad1eec7 Merge branch '2041-bug-reconfig-auto-dnssec-high-thread-number-leak-resources-and-crash-named-v9_16' into 'v9_16'
Resolve "BUG reconfig+auto-dnssec+high thread number leak resources and crash named"

See merge request isc-projects/bind9!4677
2021-02-15 20:45:57 +00:00
Diego Fronza
f4aa840f52 Add CHANGES note for [GL #2041] 2021-02-15 12:04:29 -03:00
Diego Fronza
80c1a44643 Test reconfig after adding inline signed zones won't crash named
This test ensures that named won't crash after many inline-signed zones
are added to configurarion, followed by a rndc reconfig.
2021-02-15 11:53:24 -03:00
Diego Fronza
d89a8bf696 Fix dangling references to outdated views after reconfig
This commit fix a leak which was happening every time an inline-signed
zone was added to the configuration, followed by a rndc reconfig.

During the reconfig process, the secure version of every inline-signed
zone was "moved" to a new view upon a reconfig and it "took the raw
version along", but only once the secure version was freed (at shutdown)
was prev_view for the raw version detached from, causing the old view to
be released as well.

This caused dangling references to be kept for the previous view, thus
keeping all resources used by that view in memory.
2021-02-15 11:52:50 -03:00
Petr Špaček
87717f4006 Merge branch 'pspacek/ci-python-allthetime-v9_16' into 'v9_16'
[v9_16]  Run Python linters in CI even outside of merge requests

See merge request isc-projects/bind9!4675
2021-02-15 08:58:12 +00:00
Petr Špaček
441d2e310e Run Python linters in CI even outside of merge requests
Previously it did not get run on scheduled CI pipelines.

(cherry picked from commit 74d7cddc4c)
2021-02-12 15:51:05 +01:00
Michal Nowak
9a80a1b17e Merge branch 'mnowak/check-for-unrecognized-options-v9_16' into 'v9_16'
[v9_16] Check for unrecognized configure options

See merge request isc-projects/bind9!4568
2021-02-12 13:31:39 +00:00
Michal Nowak
ec278d628d Add --enable-option-checking=fatal to ./configure in CI
The --enable-option-checking=fatal option prevents ./configure from
proceeding when an unknown option is used in the ./configure step in CI.
This change will avoid adding unsupported ./configure options or options
with typo or typo in pairwise testing "# [pairwise: ...]" marker.

(cherry picked from commit 4295c82e45)
2021-02-12 14:16:26 +01:00
Michal Nowak
3e22c588ae Merge branch '2312-lint-generated-manual-pages-v9_16' into 'v9_16'
[v9_16] Lint manual pages

See merge request isc-projects/bind9!4673
2021-02-12 12:21:55 +00:00
Michal Nowak
69a51f311a Lint manual pages
As we generate manual pages from reStructuredText sources, we don't have
absolute control on manual page output and therefore 'mandoc -Tlint' may
always report warnings we can't eliminate. In light of this some mandoc
warnings need to be ignored.

(cherry picked from commit 22fdcb30db)
2021-02-12 12:58:18 +01:00
Mark Andrews
6bd42bc124 Merge branch '2421-cid-316509-untrusted-value-as-argument-tainted_scalar-v9_16' into 'v9_16'
Resolve "CID 316509: Untrusted value as argument (TAINTED_SCALAR)"

See merge request isc-projects/bind9!4671
2021-02-12 00:01:28 +00:00
Mark Andrews
6e30caed57 Silence Insecure data handling (TAINTED_SCALAR)
Coverity assumes that the memory holding any value read using byte
swapping is tainted.  As we store the NSEC3PARAM records in wire
form and iterations is byte swapped the memory holding the record
is marked as tainted.  nsec3->salt_length is marked as tainted
transitively. To remove the taint the value need to be range checked.
For a correctly formatted record region.length should match
nsec3->salt_length and provides a convenient value to check the field
against.

    *** CID 316507:  Insecure data handling  (TAINTED_SCALAR)
    /lib/dns/rdata/generic/nsec3param_51.c: 241 in tostruct_nsec3param()
    235     	region.length = rdata->length;
    236     	nsec3param->hash = uint8_consume_fromregion(&region);
    237     	nsec3param->flags = uint8_consume_fromregion(&region);
    238     	nsec3param->iterations = uint16_consume_fromregion(&region);
    239
    240     	nsec3param->salt_length = uint8_consume_fromregion(&region);
    >>>     CID 316507:  Insecure data handling  (TAINTED_SCALAR)
    >>>     Passing tainted expression "nsec3param->salt_length" to "mem_maybedup", which uses it as an offset.
    241     	nsec3param->salt = mem_maybedup(mctx, region.base,
    242     					nsec3param->salt_length);
    243     	if (nsec3param->salt == NULL) {
    244     		return (ISC_R_NOMEMORY);
    245     	}
    246     	isc_region_consume(&region, nsec3param->salt_length);

(cherry picked from commit c40133d840)
2021-02-12 10:43:19 +11:00
Mark Andrews
8302e9fb69 Silence Untrusted value as argument (TAINTED_SCALAR)
Coverity assumes that the memory holding any value read using byte
swapping is tainted.  As we store the NSEC3 records in wire form
and iterations is byte swapped the memory holding the record is
marked as tainted.  nsec3->salt_length and nsec3->next_length are
marked as tainted transitively. To remove the taint the values need
to be range checked.  Valid values for these should never exceed
region.length so that is becomes a reasonable value to check against.

    *** CID 316509:    (TAINTED_SCALAR)
    /lib/dns/rdata/generic/nsec3_50.c: 312 in tostruct_nsec3()
    306     	if (nsec3->salt == NULL) {
    307     		return (ISC_R_NOMEMORY);
    308     	}
    309     	isc_region_consume(&region, nsec3->salt_length);
    310
    311     	nsec3->next_length = uint8_consume_fromregion(&region);
    >>>     CID 316509:    (TAINTED_SCALAR)
    >>>     Passing tainted expression "nsec3->next_length" to "mem_maybedup", which uses it as an offset.
    312     	nsec3->next = mem_maybedup(mctx, region.base, nsec3->next_length);
    313     	if (nsec3->next == NULL) {
    314     		goto cleanup;
    315     	}
    316     	isc_region_consume(&region, nsec3->next_length);
    317
    /lib/dns/rdata/generic/nsec3_50.c: 305 in tostruct_nsec3()
    299     	region.length = rdata->length;
    300     	nsec3->hash = uint8_consume_fromregion(&region);
    301     	nsec3->flags = uint8_consume_fromregion(&region);
    302     	nsec3->iterations = uint16_consume_fromregion(&region);
    303
    304     	nsec3->salt_length = uint8_consume_fromregion(&region);
    >>>     CID 316509:    (TAINTED_SCALAR)
    >>>     Passing tainted expression "nsec3->salt_length" to "mem_maybedup", which uses it as an offset.
    305     	nsec3->salt = mem_maybedup(mctx, region.base, nsec3->salt_length);
    306     	if (nsec3->salt == NULL) {
    307     		return (ISC_R_NOMEMORY);
    308     	}
    309     	isc_region_consume(&region, nsec3->salt_length);
    310

(cherry picked from commit fd8d1337a5)
2021-02-12 10:43:19 +11:00
Michal Nowak
d52e67211a Merge branch 'mnowak/enable-libns-tests-to-run-under-asan-v9_16' into 'v9_16'
[v9_16] Drop AddressSanitizer constraint from libns unit tests

See merge request isc-projects/bind9!4667
2021-02-10 10:37:12 +00:00