11232 Commits
Author SHA1 Message Date
Tinderbox UserandEvan Hunt 1fb54b7bd6 prep 9.12.4rc1 2019-02-20 19:45:38 -08:00
Mark AndrewsandEvan Hunt e6bba06951 denied axfr requests were not effective for writable DLZ zones
(cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283)
2019-02-20 19:45:14 -08:00
Mark AndrewsandEvan Hunt 3b88bc3d3b silently ignore additional keytag options
(cherry picked from commit 36158e6c96e982768bd33d4090cbe563718534f2)
2019-02-20 19:45:12 -08:00
Matthijs MekkingandEvan Hunt 2f93529a53 Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key.

(cherry picked from commit b1d5411569ae10830b63f07560091193646cc739)
2019-02-20 19:45:10 -08:00
Matthijs MekkingandEvan Hunt 8d4741af21 Don't free key in compute_tag in case of failure
If `dns_dnssec_keyfromrdata` failed we don't need to call
`dst_key_free` because no `dstkey` was created.  Doing so
nevertheless will result in an assertion failure.

This can happen if the key uses an unsupported algorithm.

(cherry picked from commit 7a1ca39b950b7d5230b605ac60f15a1cb94e3d69)
2019-02-20 19:45:09 -08:00
Evan Hunt c73e3175c7 timer_test failed to compile if cmocka was enabled but threads were not 2019-02-20 13:35:51 -08:00
Mark Andrews 471a69abc2 teach proto_c to look in the source directory for out of tree builds
(cherry picked from commit c0d4ff5796)
2019-02-20 09:45:45 +11:00
Mark Andrews 65d78a3772 remove redundant assignment
(cherry picked from commit f475dc75b1)
2019-02-19 10:23:45 +11:00
Mark Andrews 52ccbcd5a1 remove seen_dname
(cherry picked from commit 63c03cdb2d)
2019-02-19 10:18:19 +11:00
Mark Andrews ea232ab917 fix memory leak
(cherry picked from commit 7114d16098)
2019-02-19 09:37:48 +11:00
Mark Andrews 48d49338a3 assert result is ISC_R_SUCCESS
(cherry picked from commit 76a1c1531a)
2019-02-19 08:00:13 +11:00
Mark Andrews 547bf4efd2 fix AMTRELAY name
(cherry picked from commit a9fadafecd)
2019-02-08 14:10:17 +11:00
Mark Andrews 7fb8e80d52 add top of range checks
(cherry picked from commit 8d69e15988)
2019-02-08 10:27:41 +11:00
Evan HuntandMark Andrews 079d86dd31 Add support for ZONEMD
(cherry picked from commit 3183663dd4)
2019-02-08 08:32:45 +11:00
Mark Andrews 93a8a99191 Add support for ATMRELAY
(cherry picked from commit 66922ee7af)
2019-02-08 08:32:44 +11:00
Tony FinchandEvan Hunt 1be4212eef cleanup: allow building DS directly from CDNSKEY
Relax an assertion in lib/dns/ds.c so that dnssec-cds does
not have to work around it. This will also be useful for
dnssec-dsfromkey.

(cherry picked from commit 2e173bbd24)
2019-02-05 21:22:54 -08:00
Mark AndrewsandEvan Hunt 5115d677de log RPZ type and class
(cherry picked from commit 28442f11f0)
2019-01-31 17:39:29 -08:00
Matthijs MekkingandEvan Hunt cf235900d7 Add tests for dumpdb stale ttl
This adds a test for rndc dumpdb to ensure the correct "stale
comment" is printed.  It also adds a test for non-stale data to
ensure no "stale comment" is printed for active RRsets.

In addition, the serve-stale tests are hardened with more accurate
grep calls.
2019-01-31 10:30:11 -08:00
Matthijs MekkingandEvan Hunt 68e3472a62 Print in dump-file stale ttl
This change makes rndc dumpdb correctly print the "; stale" line.
It also provides extra information on how long this data may still
be served to clients (in other words how long the stale RRset may
still be used).
2019-01-31 10:30:11 -08:00
Evan Hunt 51589d0392 Change #4148 wasn't complete
- there was a memory leak when using negotiated TSIG keys.
- TKEY responses could only be signed when using a newly negotiated
  key; if an existent matching TSIG was found in in the keyring it
  would not be used.

(cherry picked from commit 73ba24fb36)
2019-01-31 09:28:51 -08:00
Matthijs MekkingandEvan Hunt 879fc0285e allow TSIG key to be added to message structure after parsing
up until now, message->tsigkey could only be set during parsing
of the request, but gss-tsig allows one to be created afterward.
2019-01-30 12:11:23 -08:00
Petr MenšíkandEvan Hunt a26673a088 Do not fail on NULL passed to OpenSSL_free
Some plugins might call it after deconstruction. Do not crash if there
is no reason for it.
2019-01-29 18:23:57 -05:00
Matthijs MekkingandEvan Hunt a5c834b49b Remove dead code
(cherry picked from commit 7c13f1779e)
2019-01-24 12:04:32 -08:00
Evan Hunt 950023d36e set the magic number at the end of dns_dt_create()
(cherry picked from commit c29abd307c)
2019-01-23 11:13:32 -08:00
Evan HuntandMark Andrews bc912227d6 removed a debugging fprintf
(cherry picked from commit 6c478a3dae)
2019-01-21 17:00:57 +11:00
Witold KręcickiandEvan Hunt f8963ad70e If possible don't use forwarders when priming the resolver.
If we try to fetch a record from cache and need to look into
hints database we assume that the resolver is not primed and
start dns_resolver_prime(). Priming query is supposed to return
NSes for "." in ANSWER section and glue records for them in
ADDITIONAL section, so that we can fill that info in 'regular'
cache and not use hints db anymore.
However, if we're using a forwarder the priming query goes through
it, and if it's configured to return minimal answers we won't get
the addresses of root servers in ADDITIONAL section. Since the
only records for root servers we have are in hints database we'll
try to prime the resolver with every single query.

This patch adds a DNS_FETCHOPT_NOFORWARD flag which avoids using
forwarders if possible (that is if we have forward-first policy).
Using this flag on priming fetch fixes the problem as we get the
proper glue. With forward-only policy the problem is non-existent,
as we'll never ask for root server addresses because we'll never
have a need to query them.

Also added a test to confirm priming queries are not forwarded.

(cherry picked from commit b49310ac06)
2019-01-16 16:32:43 -08:00
Petr MenšíkandMark Andrews f1fe423aaa Make sure null atributes are never used
Add INSIST to pubattr fetching where null might occur in therory. Make
sure null is never dereferenced.

(cherry picked from commit fe9ef0d9f5)
2019-01-17 09:00:27 +11:00
Mark AndrewsandEvan Hunt a9ceb01fde adjust timeout to allow for ECN negotiation failures
(cherry picked from commit dadb924be7)
2019-01-15 17:29:48 -08:00
Ondřej Surý e92bca0222 Fix race condition in cleanup part of dns_dt_create()
(cherry picked from commit 482dd7eed3)
2019-01-15 09:43:10 +01:00
Mark Andrews 6cb48b7a41 ensure that WSAStartup is called before getservbyname
(cherry picked from commit ac01359871)
2019-01-15 16:29:04 +11:00
Mark Andrews 2c3d353d57 update refreshkeytime
(cherry picked from commit ca977e3976)
2019-01-09 19:50:59 +11:00
Mark Andrews e216ee68ef maybe_numeric failed to handle NUL in text region.
(cherry picked from commit ee23780246)
2019-01-09 19:22:38 +11:00
Mark Andrews 0b8d530c84 Ensure base64/base32/hex fields in DNS records that should be non-empty are.
(cherry picked from commit 5e8b772ad1)
2019-01-09 18:53:29 +11:00
Mark AndrewsandEvan Hunt 019b12fc09 allow for up 100 records or 64K of data to be in a ncache entry
(cherry picked from commit 604889e627)
2019-01-08 21:27:36 -08:00
Mark AndrewsandEvan Hunt 3d76dae6d7 explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove from dns_result_torcode
(cherry picked from commit 0c42a9c0ab)
2019-01-08 20:50:35 -08:00
Michał Kępień 82103796af Track forwarder timeouts in fetch contexts
Since following a delegation resets most fetch context state, address
marks (FCTX_ADDRINFO_MARK) set inside lib/dns/resolver.c are not
preserved when a delegation is followed.  This is fine for full
recursive resolution but when named is configured with "forward first;"
and one of the specified forwarders times out, triggering a fallback to
full recursive resolution, that forwarder should no longer be consulted
at each delegation point subsequently reached within a given fetch
context.

Add a new badnstype_t enum value, badns_forwarder, and use it to mark a
forwarder as bad when it times out in a "forward first;" configuration.
Since the bad server list is not cleaned when a fetch context follows a
delegation, this prevents a forwarder from being queried again after
falling back to full recursive resolution.  Yet, as each fetch context
maintains its own list of bad servers, this change does not cause a
forwarder timeout to prevent that forwarder from being used by other
fetch contexts.

(cherry picked from commit 33350626f9)
2019-01-08 08:31:16 +01:00
Ondřej Surý 179867290f Abort on allocation failure only if the memory functions are used internally in BIND 9 2018-12-21 09:22:17 +01:00
Ondřej Surý 1543df6b4e Abort on memory allocation failure
(cherry picked from commit 8de2451756)
2018-12-21 09:22:17 +01:00
Matthijs MekkingandMatthijs Mekking ed6674c9fd Move REQUIRE outside comment unsupported alg
(cherry picked from commit 5ca649967e)
2018-12-20 15:49:06 +01:00
Matthijs MekkingandMatthijs Mekking c0701e7ff2 Allow unsupported alg in zone /w dnssec-signzone
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.  Current behavior is that it will
fail, hitting a fatal error.  The fix detects unsupported algorithms
and will not try to add it to the keylist.

Also when determining the maximum iterations for NSEC3, don't take
into account DNSKEY records in the zonefile with an unsupported
algorithm.

(cherry picked from commit 1dd11fc754)
2018-12-20 15:49:06 +01:00
Ondřej Surý bdc09e455e __SANITIZE_ADDRESS__ needs to be defined to 1
(cherry picked from commit ff7c868f25)
2018-12-20 00:14:58 +01:00
Ondřej Surý e055809c6f gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define
(cherry picked from commit 8903d68d69)
2018-12-19 12:44:51 +01:00
Ondřej Surý aeb6b97dad Disable RTLD_DEEPBIND when compiled under AddressSanitizer
(cherry picked from commit cad6b39cab)
2018-12-19 10:49:56 +01:00
Ondřej Surý afddfcb3f5 Define __ADDRESS_SANITIZER__ if compiling under clang's AddressSanitizer
(cherry picked from commit e1ce3a3d42)
2018-12-19 10:49:44 +01:00
Mark Andrews 0c19967532 pass the correct object to cfg_obj_log
(cherry picked from commit 53a33f7365)
2018-12-16 19:21:47 -05:00
Ondřej Surý 868e02a9ee Fix the stdatomic #ifdefs to work with older compilers 2018-12-14 09:00:13 +01:00
Ondřej Surý 9ae1c97b21 Add better EMPTY_TRANSLATION_UNIT to isc/util.h 2018-12-14 09:00:13 +01:00
Ondřej Surý a69f38e478 Fix ECC algorithms unused constants in PKCS#11 build 2018-12-14 09:00:12 +01:00
Mark Andrews be038493b9 add unit tests for dns_rdatatype_atcname, dns_rdatatype_atparent and iszonecutauth
(cherry picked from commit f2f7711977)
2018-12-14 14:27:53 +11:00
Mark Andrews 0eaa9a02b7 create dns_rdatatype_atcname to split records that can appear along side CNAME from DNSSEC; dns_rdatatype_iszonecutauth allowed too many types
(cherry picked from commit f4ceb12b69)
2018-12-14 14:12:31 +11:00