]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
4 years agorec: Log when going Bogus because of a missing SOA in authority 9527/head
Remi Gacogne [Tue, 15 Sep 2020 13:03:34 +0000 (15:03 +0200)] 
rec: Log when going Bogus because of a missing SOA in authority

A missing SOA in the authority section of negative (NXDOMAIN, NODATA)
answers in a DNSSEC-secure zone currently leads to a Bogus result,
because the needed NSEC/NSEC3 could not be validated.

(cherry picked from commit 832f4fbdd7ef50d0e0ff5135ee6e270acc22df9d)

4 years agoMerge pull request #9507 from omoerbeek/rec-backport-9497-to-rec-4.3.x
Otto Moerbeek [Fri, 25 Sep 2020 06:39:43 +0000 (08:39 +0200)] 
Merge pull request #9507 from omoerbeek/rec-backport-9497-to-rec-4.3.x

rec: Backport essential part of #9497 to rec-4.3.x: raise an exception on invalid content in unknown records

4 years agoMerge pull request #9501 from omoerbeek/rec-boost-bind-to-std-bind
Otto Moerbeek [Fri, 25 Sep 2020 06:38:32 +0000 (08:38 +0200)] 
Merge pull request #9501 from omoerbeek/rec-boost-bind-to-std-bind

rec: backport to rec-4.3.x: Boost 1.73 moved boost::bind placeholders to the placeholders namespace

4 years agoBackport essential part of #9497 to rec-4.3.x 9507/head
Otto Moerbeek [Tue, 22 Sep 2020 11:19:21 +0000 (13:19 +0200)] 
Backport essential part of #9497 to rec-4.3.x

4 years agoMinimal backport of #9070 9501/head
Otto Moerbeek [Tue, 22 Sep 2020 08:39:49 +0000 (10:39 +0200)] 
Minimal backport of #9070

4 years agoMerge pull request #9457 from omoerbeek/backport-9454-to-rec-4.3.x
Otto Moerbeek [Fri, 11 Sep 2020 07:37:52 +0000 (09:37 +0200)] 
Merge pull request #9457 from omoerbeek/backport-9454-to-rec-4.3.x

rec: Backport to rec-4.3.x: Parts is reused, so clear the names it might contain.

4 years agoMerge pull request #9460 from rgacogne/rec43-remove-non-rec-tests
Otto Moerbeek [Fri, 11 Sep 2020 06:34:04 +0000 (08:34 +0200)] 
Merge pull request #9460 from rgacogne/rec43-remove-non-rec-tests

rec-4.3.x: Remove non-recursor tests

4 years agorec-4.3.x: Remove non-recursor tests 9460/head
Remi Gacogne [Thu, 10 Sep 2020 09:28:20 +0000 (11:28 +0200)] 
rec-4.3.x: Remove non-recursor tests

(cherry picked from commit f7687fa94a99d47fd7c3d442f08a1b97c0b74097)

4 years agoParts is reused, so clear the names it might contain. 9457/head
Otto Moerbeek [Wed, 9 Sep 2020 13:11:26 +0000 (15:11 +0200)] 
Parts is reused, so clear the names it might contain.

(cherry picked from commit bc3d2b7386e058c39872a3aa74101283b6f1af45)

4 years agoMerge pull request #9416 from omoerbeek/backport-9375-to-rec-4.3.x rec-4.3.4
Otto Moerbeek [Tue, 1 Sep 2020 08:49:39 +0000 (10:49 +0200)] 
Merge pull request #9416 from omoerbeek/backport-9375-to-rec-4.3.x

rec: backport 9375 to rec 4.3.x: Allow some more depth headroom for the no-qname-minimization fallback case

4 years agoDocument the extra allowance in case of qname-minimization fallback. 9416/head
Otto Moerbeek [Tue, 25 Aug 2020 11:27:51 +0000 (13:27 +0200)] 
Document the extra allowance in case of qname-minimization fallback.

(cherry picked from commit b2090adc7631d96c6c21eaf8086747639f75c572)

4 years agoAdd comment what the effect of calling the qname-minimization
Otto Moerbeek [Mon, 10 Aug 2020 11:36:15 +0000 (13:36 +0200)] 
Add comment what the effect of calling the qname-minimization
fallback code can be for maxdepth.

(cherry picked from commit a4980f5632404f84b7de976595d43b4969b7feac)

4 years agoAllow some more depth headroom for the no-qname-minimization fallback case.
Otto Moerbeek [Mon, 10 Aug 2020 10:57:11 +0000 (12:57 +0200)] 
Allow some more depth headroom for the no-qname-minimization fallback case.

If we hit maxdepth, we still want to have some room to do the doResolveNoQNameMinimization call.

(cherry picked from commit cec49628a07e03d337aa5cf51fd925bbe31291bb)

4 years agoMerge pull request #9367 from omoerbeek/backport-9343-to-rec-4.3.x
Otto Moerbeek [Mon, 24 Aug 2020 07:48:09 +0000 (09:48 +0200)] 
Merge pull request #9367 from omoerbeek/backport-9343-to-rec-4.3.x

rec: Backport 9343 to rec 4.3.x: Resize hostname to final size in getCarbonHostname()

4 years agoMerge pull request #9397 from omoerbeek/backport-9073-to-rec-4.3.x
Otto Moerbeek [Mon, 24 Aug 2020 07:22:09 +0000 (09:22 +0200)] 
Merge pull request #9397 from omoerbeek/backport-9073-to-rec-4.3.x

rec: Backport 9073 to rec 4.3.x: Ensure runtime dirs for virtual services differ

4 years agoSet socket-dir to RUNTIME_DIRECTORY under systemd. 9397/head
Pieter Lexis [Wed, 29 Apr 2020 09:32:23 +0000 (11:32 +0200)] 
Set socket-dir to RUNTIME_DIRECTORY under systemd.

RUNTIME_DIRECTORY is set by systemd to the value to `RuntimeDirectory`
, which is managed by systemd and so it is safe to use for the socket-dir.

(cherry picked from commit 9a5b0a54fa460c56fd895974ca41db4e869ae0e0)

4 years agoEnsure runtime dirs for virtual services differ
Pieter Lexis [Wed, 29 Apr 2020 08:12:03 +0000 (10:12 +0200)] 
Ensure runtime dirs for virtual services differ

(cherry picked from commit fcbada458f4625736ba962d6523339b0c34a04f0)

5 years agoAadpt test to always truncate at '.' which happens <= 4.3.x 9367/head
Otto Moerbeek [Fri, 31 Jul 2020 08:14:50 +0000 (10:14 +0200)] 
Aadpt test to always truncate at '.' which happens <= 4.3.x

5 years agotest-misc_hh: Add test for getCarbonHostname
Aki Tuomi [Tue, 21 Jul 2020 19:04:56 +0000 (22:04 +0300)] 
test-misc_hh: Add test for getCarbonHostname

(cherry picked from commit f19c0ed44619382b41119c8fb3136a3eb11790b8)

5 years agomisc.cc: Resize hostname to final size in getCarbonHostname()
Aki Tuomi [Sun, 19 Jul 2020 15:06:14 +0000 (18:06 +0300)] 
misc.cc: Resize hostname to final size in getCarbonHostname()

In 5c21b47fbc35ddcb8d939eb8541c6c3bad1080a8 we change how
hostname is allocated. We allocate getMaxHostNameSize for string,
then give the raw buffer for gethostname function, but forget to
resize the string into actual result length, causing the carbon
output to include trailing NUL bytes after hostname.

(cherry picked from commit 57f8ac68b4fa7063fd2cac4d5b77045e0255c770)

5 years agoMerge pull request #9330 from omoerbeek/backport-9309-to-rec-4.3.x rec-4.3.3
Otto Moerbeek [Tue, 14 Jul 2020 11:09:40 +0000 (13:09 +0200)] 
Merge pull request #9330 from omoerbeek/backport-9309-to-rec-4.3.x

rec: Backport 9309 to rec 4.3.x: Validate cached DNSKEYs against the DSs, not the RRSIGs only

5 years agoMerge pull request #9329 from omoerbeek/backport-9297-to-rec-4.3.x
Otto Moerbeek [Tue, 14 Jul 2020 11:09:22 +0000 (13:09 +0200)] 
Merge pull request #9329 from omoerbeek/backport-9297-to-rec-4.3.x

rec: Backport 9297 to rec 4.3.x: Ignore cache-only for DNSKEYs and DS retrieval

5 years agoMerge pull request #9328 from omoerbeek/backport-9292-to-rec-4.3.x
Otto Moerbeek [Tue, 14 Jul 2020 11:09:01 +0000 (13:09 +0200)] 
Merge pull request #9328 from omoerbeek/backport-9292-to-rec-4.3.x

rec: backport 9292 to rec 4.3.x: A ServFail while retrieving DS/DNSKEY records is just that

5 years agoMerge pull request #9327 from omoerbeek/backport-9188-to-rec-4.3.x
Otto Moerbeek [Tue, 14 Jul 2020 11:08:39 +0000 (13:08 +0200)] 
Merge pull request #9327 from omoerbeek/backport-9188-to-rec-4.3.x

rec: Backport 9188 to rec 4.3.x: Refuse DS records received from child zones

5 years agorec: Ignore cache-only for DSs retrieval 9329/head
Remi Gacogne [Tue, 7 Jul 2020 07:56:41 +0000 (09:56 +0200)] 
rec: Ignore cache-only for DSs retrieval

When the DSs are needed for validation, the initial RD flag should
not prevent us from going to the network.

(cherry picked from commit 68536f5ba1b37b1ab6008ab8842a4eeb676cc3e4)

5 years agorec: Ignore cache-only for DNSKEYs retrieval
Remi Gacogne [Fri, 3 Jul 2020 15:29:33 +0000 (17:29 +0200)] 
rec: Ignore cache-only for DNSKEYs retrieval

When the DNSKEYs are needed for validation, the initial RD flag
should not prevent us from going to the network.

(cherry picked from commit 38a7e82df8eaa8bee8fe9b444e81e1d71710d4de)

5 years agoFix merge 9330/head
Otto Moerbeek [Mon, 13 Jul 2020 14:21:00 +0000 (16:21 +0200)] 
Fix merge

5 years agorec: Validate cached DNSKEYs against the DSs, not the RRSIGs only
Remi Gacogne [Mon, 6 Jul 2020 13:00:44 +0000 (15:00 +0200)] 
rec: Validate cached DNSKEYs against the DSs, not the RRSIGs only

DNSKEYs might be cached in a non-validated state ("Indeterminate")
when the DNSSEC mode is set to "Process" and the initial query did
not ask for validation.
We would then validate the DNSKEY records against the RRSIGs, like
for regular records, but not against the DSs.

(cherry picked from commit 453f37736a4d372e16755a903f5b5d5ac52b0c17)

5 years agorec: A ServFail while retrieving DS/DNSKEY records is just that 9328/head
Remi Gacogne [Thu, 2 Jul 2020 08:31:31 +0000 (10:31 +0200)] 
rec: A ServFail while retrieving DS/DNSKEY records is just that

Before that commit, failing to get the DS or DNSKEY records needed
during validation because of a network issue would trigger a Bogus
DNSSEC validation result because validation could not be performed,
but that should just be a Server Failure instead.
This is especially an issue because the Bogus result would get
inserted into the cache and could stay there for as long as
'max-cache-bogus-ttl' seconds.

(cherry picked from commit e122af1cf073cab4bd0b1b346b6e166b49870d70)

5 years agorec: Add a 'skip DS from child zone' unit test 9327/head
Remi Gacogne [Tue, 7 Jul 2020 12:22:59 +0000 (14:22 +0200)] 
rec: Add a 'skip DS from child zone' unit test

(cherry picked from commit 2b4f326914460e3c2a8cb1249fdd535090a355f7)

5 years agorec: Refuse DS records received from child zones
Remi Gacogne [Tue, 2 Jun 2020 15:19:42 +0000 (17:19 +0200)] 
rec: Refuse DS records received from child zones

(cherry picked from commit 3b8b3a7760b655d078aed24c42b0c48e1115eb55)

5 years agoMerge pull request #9305 from omoerbeek/backport-9268-to-rec-4.3.x
Otto Moerbeek [Tue, 7 Jul 2020 12:38:45 +0000 (14:38 +0200)] 
Merge pull request #9305 from omoerbeek/backport-9268-to-rec-4.3.x

rec: backport of 9268 to 4.3.x: Better exception handling in houseKeeping / handlePolicyHit

5 years agoMerge pull request #9304 from omoerbeek/backport-9301-to-rec-4.3.x
Otto Moerbeek [Tue, 7 Jul 2020 09:35:36 +0000 (11:35 +0200)] 
Merge pull request #9304 from omoerbeek/backport-9301-to-rec-4.3.x

rec: backport 9301 to rec 4.3.x: take initial refresh time from loaded zone

5 years agoFix indentation 9305/head
Otto Moerbeek [Tue, 7 Jul 2020 09:25:56 +0000 (11:25 +0200)] 
Fix indentation

5 years agorec: backport of 9268 to 4.3.x: Better exception handling in houseKeeping / handlePol...
Otto Moerbeek [Tue, 7 Jul 2020 08:54:15 +0000 (10:54 +0200)] 
rec: backport of 9268 to 4.3.x: Better exception handling in houseKeeping / handlePolicyHit

5 years agoWhen no rpz cache is used and no refresh time is specified, use 9304/head
Otto Moerbeek [Mon, 6 Jul 2020 13:55:53 +0000 (15:55 +0200)] 
When no rpz cache is used and no refresh time is specified, use
the refresh time read on the initial load of the zone.

Should fix #9299.

(cherry picked from commit 3f4d728767f3924b4b96b22e6ae312ba8decdfe9)

5 years agoMerge pull request #9285 from omoerbeek/rec-acl-backport-to-4.3.x rec-4.3.2
Otto Moerbeek [Tue, 30 Jun 2020 14:33:58 +0000 (16:33 +0200)] 
Merge pull request #9285 from omoerbeek/rec-acl-backport-to-4.3.x

rec: Backport of acl fix to 4.3.x

5 years agoBackport of acl fix to 4.3.x 9285/head
Otto Moerbeek [Tue, 30 Jun 2020 13:15:15 +0000 (15:15 +0200)] 
Backport of acl fix to 4.3.x

5 years agoMerge pull request #9262 from omoerbeek/backport-9251-to-rec-4.3.x
Otto Moerbeek [Fri, 19 Jun 2020 10:56:18 +0000 (12:56 +0200)] 
Merge pull request #9262 from omoerbeek/backport-9251-to-rec-4.3.x

rec: backport 9251 to rec 4.3.x: Copy the negative cache entry before validating it

5 years agorec: Copy the negative cache entry before validating it 9262/head
Remi Gacogne [Wed, 17 Jun 2020 12:49:55 +0000 (14:49 +0200)] 
rec: Copy the negative cache entry before validating it

Otherwise, in the unlikely case that:
- we need to go to the network in order to validate, for example to
  get or a DNSKEY ;
- the negative cache cleaning is run at that exact moment ;
- and the entry we have a pointer to gets wiped during that cleanup

we might trigger a heap-based use-after-free (read), possibly leading
to a crash if the memory has been reused already.

5 years agoMerge pull request #9242 from omoerbeek/backport-9031-to-rec-4.3.x
Remi Gacogne [Thu, 18 Jun 2020 09:25:45 +0000 (11:25 +0200)] 
Merge pull request #9242 from omoerbeek/backport-9031-to-rec-4.3.x

rec: backport 9031 to rec 4.3.x: Fix compilation of the ports event multiplexer

5 years agoMerge pull request #9243 from omoerbeek/backport-9142-to-rec-4.3.x
Remi Gacogne [Thu, 18 Jun 2020 09:25:23 +0000 (11:25 +0200)] 
Merge pull request #9243 from omoerbeek/backport-9142-to-rec-4.3.x

rec: backport 9142 to 4.3.x: Defer the NOD lookup until after the response has been sent

5 years agoMerge pull request #9245 from omoerbeek/backport-9151-to-rec-4.3.x
Remi Gacogne [Thu, 18 Jun 2020 09:25:01 +0000 (11:25 +0200)] 
Merge pull request #9245 from omoerbeek/backport-9151-to-rec-4.3.x

rec: backport 9151 to rec 4.3.x: Fix the handling of DS queries for the root

5 years agoMerge pull request #9246 from omoerbeek/backport-9172-to-rec-4.3.x
Remi Gacogne [Thu, 18 Jun 2020 09:23:17 +0000 (11:23 +0200)] 
Merge pull request #9246 from omoerbeek/backport-9172-to-rec-4.3.x

rec: backport 9172 to rec 4.3.x: Fix RPZ removals when an update has several deltas

5 years agoMerge pull request #9247 from omoerbeek/backport-9192-to-rec-4.3.x
Remi Gacogne [Thu, 18 Jun 2020 09:22:17 +0000 (11:22 +0200)] 
Merge pull request #9247 from omoerbeek/backport-9192-to-rec-4.3.x

rec: backport 9192 to rec 4.3.x: Correct depth increments.

5 years agoMerge pull request #9248 from omoerbeek/backport-9194-to-rec-4.3.x
Remi Gacogne [Thu, 18 Jun 2020 09:21:14 +0000 (11:21 +0200)] 
Merge pull request #9248 from omoerbeek/backport-9194-to-rec-4.3.x

rec: backport 9194 and followup to rec 4.3.x: cname loop detection

5 years agoMerge pull request #9249 from omoerbeek/backport-9205-to-rec-4.3.x
Remi Gacogne [Thu, 18 Jun 2020 09:19:54 +0000 (11:19 +0200)] 
Merge pull request #9249 from omoerbeek/backport-9205-to-rec-4.3.x

rec: backport 9205 to rec 4.3.x: Limit the TTL of RRSIG records as well

5 years agorec: Limit the TTL of RRSIG records as well 9249/head
Remi Gacogne [Fri, 5 Jun 2020 13:14:35 +0000 (15:14 +0200)] 
rec: Limit the TTL of RRSIG records as well

(cherry picked from commit fe091a7206f833e6927b82b813b5af0882d8c5d9)

5 years agorec: Don't copy the records when scanning for CNAME loops 9248/head
Remi Gacogne [Tue, 9 Jun 2020 15:19:09 +0000 (17:19 +0200)] 
rec: Don't copy the records when scanning for CNAME loops

5 years agoAdd/modify tests. Also re-check for the cache case. It *is* a bit
Otto Moerbeek [Fri, 5 Jun 2020 08:37:28 +0000 (10:37 +0200)] 
Add/modify tests. Also re-check for the cache case. It *is* a bit
unsettling that case causes an ImmediateServFailException, but I do
not like to touch the general flow right now. That would be required
to make the CNAME cache case more similar to the non-cached case.

5 years agoUse seperate function to test for loop; empty result vector on loop
Otto Moerbeek [Fri, 5 Jun 2020 08:19:08 +0000 (10:19 +0200)] 
Use seperate function to test for loop; empty result vector on loop
detection (like other resolvers I tested  do).

5 years agoMore sophisticated cname loop detection.
Otto Moerbeek [Wed, 3 Jun 2020 14:31:57 +0000 (16:31 +0200)] 
More sophisticated cname loop detection.

5 years agoIf a CNAME target is found in the cache, check if it's equal
Otto Moerbeek [Wed, 3 Jun 2020 10:15:46 +0000 (12:15 +0200)] 
If a CNAME target is found in the cache, check if it's equal
to qname and ServFail if so.

Fixes the easy case of #9153. Longer chains with self-refs remain an issue.

(cherry picked from commit 58c526bd0f63d5d424b7a03867b51ace495989a8)

5 years agoCorrect depth increments. 9247/head
Otto Moerbeek [Wed, 3 Jun 2020 07:07:56 +0000 (09:07 +0200)] 
Correct depth increments.

With the introduction of qname minimization, a function
doResolveNoQNameMinimization() was introduced. This function is
called by doResolve() with depth incremented. Due to the recursive
nature of the resursor algortihm (Nomen est Omen) we end up
incrementing the depth too much. This prompted a review of the other
places depth was incremented, and I believe it should only be done
when calling doResolve(). Especially the case "+ 2" in the getAddrs()
call looks strange to me, as the doResolve() calls in getAddrs()
already call doResolve() with depth + 1.

This fixes #9184 and likely other cases of deep recursion caused
by long CNAME chains.

(cherry picked from commit a06745426b4df4d3946c36cd3429a5c8db9a8cd0)

5 years agorec: Add a regression test for the RPZ updates with several deltas 9246/head
Remi Gacogne [Thu, 28 May 2020 16:54:20 +0000 (18:54 +0200)] 
rec: Add a regression test for the RPZ updates with several deltas

(cherry picked from commit ba5f46ae28b9502294424aaa90ff9dad729de757)

5 years agorec: Fix RPZ removals when an update has several deltas
Remi Gacogne [Thu, 28 May 2020 16:15:53 +0000 (18:15 +0200)] 
rec: Fix RPZ removals when an update has several deltas

(cherry picked from commit b72e5c8578561a8c0a306a861011f5e409a4797b)

5 years agorec: Remove trailing whitespace in a comment 9245/head
Remi Gacogne [Fri, 5 Jun 2020 07:27:48 +0000 (09:27 +0200)] 
rec: Remove trailing whitespace in a comment

(cherry picked from commit a566d83d762a7e1b83742a5eba1a72449b42603e)

5 years agorec: Fix formatting in the "root DS" unit test
Remi Gacogne [Mon, 25 May 2020 14:17:50 +0000 (16:17 +0200)] 
rec: Fix formatting in the "root DS" unit test

(cherry picked from commit 2b4ea6d592aadce6e49bdff1035e0a0b0c59763b)

5 years agorec: Fix the handling of DS queries for the root
Remi Gacogne [Mon, 25 May 2020 14:02:21 +0000 (16:02 +0200)] 
rec: Fix the handling of DS queries for the root

(cherry picked from commit 16dde22c73c195d5e5a4a8bc4483627e90a7643b)

5 years agorec: Defer the NOD lookup until after the response has been sent 9243/head
Remi Gacogne [Mon, 25 May 2020 09:33:19 +0000 (11:33 +0200)] 
rec: Defer the NOD lookup until after the response has been sent

If the NOD lookup is slow, for example because the destination
authoritative server is down, doing the NOD lookup before the response
has been sent increases the latency a lot.
This commit moves the actual NOD lookup after the response has been
sent, so we can still use the existing mthread (we might actually need
to do a proper DNS resolution to find the target authoritative server)
without keeping the client waiting.

(cherry picked from commit 3bd27e4a01a3614aba3c0cf425e4ab9490318dd4)

5 years agoFix compilation of test-dns_random_hh.cc w/ getrandom AND arc4random 9242/head
Remi Gacogne [Wed, 15 Apr 2020 15:47:12 +0000 (17:47 +0200)] 
Fix compilation of test-dns_random_hh.cc w/ getrandom AND arc4random

(cherry picked from commit b212114bb037c9d202da750af76c6a6ac5c2c652)

5 years agoFix compilation of the ports event multiplexer
Remi Gacogne [Wed, 15 Apr 2020 15:42:11 +0000 (17:42 +0200)] 
Fix compilation of the ports event multiplexer

(cherry picked from commit e9d446399be2db08cc18606537e6f9ba5bee933b)

5 years agoMerge pull request #9145 from rgacogne/rec43-travis-unbreak-trusty
Remi Gacogne [Mon, 25 May 2020 14:06:54 +0000 (16:06 +0200)] 
Merge pull request #9145 from rgacogne/rec43-travis-unbreak-trusty

rec-4.3.x: travis: install pdns package from direct download

5 years agotravis: install pdns package from direct download 9145/head
Peter van Dijk [Mon, 25 May 2020 08:27:01 +0000 (10:27 +0200)] 
travis: install pdns package from direct download

(cherry picked from commit b5b83152b5a56b8095ab0d713a31c3ab5d1ec25b)

5 years agoMerge pull request #9140 from rgacogne/rec43-formatting
Remi Gacogne [Mon, 25 May 2020 09:41:41 +0000 (11:41 +0200)] 
Merge pull request #9140 from rgacogne/rec43-formatting

rec-4.3.X: Fix formatting

5 years agoMerge pull request #9130 from jsoref/rel-rec-4.3.x-suppress-spell-check
Remi Gacogne [Mon, 25 May 2020 09:26:37 +0000 (11:26 +0200)] 
Merge pull request #9130 from jsoref/rel-rec-4.3.x-suppress-spell-check

Suppress PR based spell check for the rec-4.3.x branch

5 years agofix formatting 9140/head
Otto Moerbeek [Tue, 19 May 2020 09:51:03 +0000 (11:51 +0200)] 
fix formatting

(cherry picked from commit b963ef8b7568c55493f942d660d9a61103bfc04e)

5 years agoMerge pull request #9128 from rgacogne/rec43-fix-gethostname-no-hostnamemax
Remi Gacogne [Mon, 25 May 2020 07:51:28 +0000 (09:51 +0200)] 
Merge pull request #9128 from rgacogne/rec43-fix-gethostname-no-hostnamemax

rec-4.3.x: Fix compilation on systems that do not define HOST_NAME_MAX

5 years agoSuppress PR based spell check 9130/head
Josh Soref [Tue, 19 May 2020 17:10:37 +0000 (13:10 -0400)] 
Suppress PR based spell check

5 years agoFix compilation on systems that do not define HOST_NAME_MAX 9128/head
Remi Gacogne [Tue, 19 May 2020 14:46:33 +0000 (16:46 +0200)] 
Fix compilation on systems that do not define HOST_NAME_MAX

On FreeBSD at least, HOST_NAME_MAX is not defined and we need to
use sysconf() to get the value at runtime instead.
Based on a work done by @RvdE to make the recursor compile on
FreeBSD (many thanks!).

(cherry picked from commit 4c990a1b82e091d887d873c7da5254de84aabebb)

5 years agoMerge pull request #9122 from rgacogne/rec43-gcc10
Remi Gacogne [Tue, 19 May 2020 10:50:52 +0000 (12:50 +0200)] 
Merge pull request #9122 from rgacogne/rec43-gcc10

rec-4.3.x: Fix build with gcc-10

5 years agoFix build with gcc-10 9122/head
Sander Hoentjen [Mon, 16 Dec 2019 21:44:43 +0000 (22:44 +0100)] 
Fix build with gcc-10

From an e-mail from Jeff Law <law@redhat.com>:

Subject: Minor problem in pdns, dnsdist and pdns-recursor packages in Fedora

[ All three packages have embedded copies of the same problematic code
and the same patch fixes all three. ]

Red Hat's compiler team continues to try and be proactive in identifying
issues that will arise as a result of the introduction of a new GCC
release into Fedora each spring.

You're being contacted because a package you maintain in Fedora is going
to fail to build with gcc-10 in the spring.  Yes, I know that's a few
months away, but it's far easier to fix this stuff proactively now than
wait.

Fixing it now also means that your package will continue to be built
with testing versions of gcc-10 as we proceed through the development
process thus allowing additional issues to be caught early.

Your particular package will fail due to an uninstantiated template for
AsyncLoader<Request>.  These kinds of problems are relatively common due to
changes in the tuning of the inliner for gcc-10:

> BUILDSTDERR: /usr/bin/ld: webserver.o: in function `WebServer::serveConnection(std::shared_ptr<Socket>) const':
> BUILDSTDERR: /builddir/build/BUILD/pdns-4.2.1/pdns/webserver.cc:373: undefined reference to `YaHTTP::AsyncLoader<YaHTTP::Request>::feed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
> BUILDSTDERR: collect2: error: ld returned 1 exit status
> BUILDSTDERR: make[3]: *** [Makefile:2751: ixfrdist] Error 1
>

The attached patch arranges for an instance to be instantiated when
compiling reqresp.cpp and is sufficient to fix this problem.  The
choice of reqresp.cpp fairly arbitrary IIRC.

Ideally you'll with upstream to get this fixed, but a Fedora patch is
clearly OK as well.   I'll install the attached fix into Fedora in a
week or so if I haven't heard from you.

Jeff

(cherry picked from commit ffb885e937c27bb1c62dee8f18c58ae0d5d52d39)

5 years agoMerge pull request #9115 from pieterlexis/rec-4.3.x-may-2020 rec-4.3.1
Pieter Lexis [Tue, 19 May 2020 08:49:27 +0000 (10:49 +0200)] 
Merge pull request #9115 from pieterlexis/rec-4.3.x-may-2020

Recursor 4.3.x fixes May 2020

5 years agoDon't read potentially uninitalized memory if gethostname() failed 9115/head
Remi Gacogne [Mon, 27 Apr 2020 14:48:16 +0000 (16:48 +0200)] 
Don't read potentially uninitalized memory if gethostname() failed

If the buffer is smaller than `HOST_NAME_MAX` (64 on Linux but up to
255 bytes in POSIX, which FreeBSD, MacOS etc honor) gethostname()
might return -1 without null-terminating the buffer, causing an
out-of-bounds read.
As we look for the first '.' using `strchr()`, replacing it with a
null byte, we also have a one-byte out-of-bounds write which might
result in a crash or, albeit very unlikely, arbitrary code execution.

(cherry picked from commit aac6348d56f6f3fdba9dd2455ef06081da507c14)

5 years agorec: Fix DNSSEC validation of completely empty NXDomain answers
Remi Gacogne [Fri, 24 Apr 2020 09:48:16 +0000 (11:48 +0200)] 
rec: Fix DNSSEC validation of completely empty NXDomain answers

If the answer has no SOA and no NSEC inside a DNSSEC-secure zone,
we should go Bogus.

(cherry picked from commit 1c0ee0d118a886857629aa733c23311057f315f9)

5 years agorec: Add a regression test for duplicate entries in a RPZ XFR update
Remi Gacogne [Wed, 25 Mar 2020 13:34:29 +0000 (14:34 +0100)] 
rec: Add a regression test for duplicate entries in a RPZ XFR update

5 years agorec: Don't crash on a duplicate RPZ entry received over XFR
Remi Gacogne [Wed, 25 Mar 2020 13:15:59 +0000 (14:15 +0100)] 
rec: Don't crash on a duplicate RPZ entry received over XFR

5 years agorec: Limit the number of queries sent out to get NS addresses per query
Otto Moerbeek [Mon, 23 Mar 2020 14:22:32 +0000 (15:22 +0100)] 
rec: Limit the number of queries sent out to get NS addresses per query

5 years agoMerge pull request #9082 from omoerbeek/backport-8972-to-rec-4.3.x
Otto Moerbeek [Fri, 1 May 2020 12:59:37 +0000 (14:59 +0200)] 
Merge pull request #9082 from omoerbeek/backport-8972-to-rec-4.3.x

rec: backport to rec 4.3.x: builder: add ubuntu focal target

5 years agobuilder: add ubuntu focal target 9082/head
Peter van Dijk [Wed, 25 Mar 2020 10:41:15 +0000 (11:41 +0100)] 
builder: add ubuntu focal target

(cherry picked from commit b4f4b1ab4ba666fe16f0201b38778fe66dc8e7ae)

5 years agoMerge pull request #9048 from omoerbeek/backport-8778-to-rec-4.3.x
Otto Moerbeek [Wed, 22 Apr 2020 09:14:53 +0000 (11:14 +0200)] 
Merge pull request #9048 from omoerbeek/backport-8778-to-rec-4.3.x

rec: Backport 8778 to rec 4.3.x: RPZ dumpFile/seedFile: store/get SOA refresh on dump/load

5 years agoWarn at refresh=0 9048/head
Otto Moerbeek [Tue, 11 Feb 2020 11:30:29 +0000 (12:30 +0100)] 
Warn at refresh=0

(cherry picked from commit 1778d156949380dff86304aa5dbbfb5e10351302)

5 years agoTweaks for minimum time
Otto Moerbeek [Mon, 10 Feb 2020 14:17:09 +0000 (15:17 +0100)] 
Tweaks for minimum time

(cherry picked from commit 87e7a7268ff1c2117f51fbc208ea213584d59536)

5 years agoIntroduce an explicit refreshFromConf arg to RPZIXFRTracker.
Otto Moerbeek [Mon, 10 Feb 2020 13:31:41 +0000 (14:31 +0100)] 
Introduce an explicit refreshFromConf arg to RPZIXFRTracker.

Always load and store the rpz refresh value from and to the zone.
That we we can easily decide which value to use: if an explicit
refreshFromConf value is set, use that one, otherwise use the one
in the rpz zone.

(cherry picked from commit d70a762725cd7011b15286eb580ad93c932b7641)

5 years agorec RPZ dumpFile/seedFile: store/get SOA refresh on dump/load
Peter van Dijk [Mon, 3 Feb 2020 19:09:07 +0000 (20:09 +0100)] 
rec RPZ dumpFile/seedFile: store/get SOA refresh on dump/load

(cherry picked from commit 982817f34d0826bc80adefe488ba8d0383b0e6cf)

5 years agoMerge pull request #8963 from omoerbeek/backport-8876-to-rec-4.3.x
Remi Gacogne [Tue, 24 Mar 2020 09:04:19 +0000 (10:04 +0100)] 
Merge pull request #8963 from omoerbeek/backport-8876-to-rec-4.3.x

rec: backport 8876 to rec-4.3.x: Update boost.m4

5 years agoUpdate boost.m4 8963/head
Pieter Lexis [Fri, 28 Feb 2020 08:27:30 +0000 (09:27 +0100)] 
Update boost.m4

Closes #8875

(cherry picked from commit 2bcb6ea0ddc99548d3d7d6d317c5d64d55aac6cc)

5 years agoMerge pull request #8870 from omoerbeek/backport-8864-to-rec-4.3.x rec-4.3.0
Otto Moerbeek [Wed, 26 Feb 2020 17:14:31 +0000 (18:14 +0100)] 
Merge pull request #8870 from omoerbeek/backport-8864-to-rec-4.3.x

rec: backport 8864 to rec 4.3.x: Only log qname parsing errors when 'log-common-errors' is set

5 years agorec: Only log qname parsing errors when 'log-common-errors' is set 8870/head
Remi Gacogne [Wed, 26 Feb 2020 10:18:35 +0000 (11:18 +0100)] 
rec: Only log qname parsing errors when 'log-common-errors' is set

(cherry picked from commit 4b4566e8d28ff3b18152213e8c8666aa643f8eb9)

5 years agoMerge pull request #8863 from omoerbeek/backport-8857-to-rec-4.3.x
Otto Moerbeek [Wed, 26 Feb 2020 11:14:05 +0000 (12:14 +0100)] 
Merge pull request #8863 from omoerbeek/backport-8857-to-rec-4.3.x

rec: backport 8857 to rec 4.3.x: update copyright year

5 years agoMerge pull request #8865 from omoerbeek/backport-8833-to-rec-4.3.x
Otto Moerbeek [Wed, 26 Feb 2020 11:13:44 +0000 (12:13 +0100)] 
Merge pull request #8865 from omoerbeek/backport-8833-to-rec-4.3.x

rec: backport 8833 to rec 4.3.x: Allow all connections to the PG server in Circle CI

5 years agoAllow all connections to the PG server in Circle CI 8865/head
Remi Gacogne [Mon, 17 Feb 2020 14:11:29 +0000 (15:11 +0100)] 
Allow all connections to the PG server in Circle CI

(cherry picked from commit fed8314d910dbd61f3f3abfbf51f8a316b93001c)

5 years agoIt's 2020 8863/head
Otto Moerbeek [Mon, 24 Feb 2020 14:58:08 +0000 (15:58 +0100)] 
It's 2020

(cherry picked from commit 9fce9d6c21253da0fbeed5163d148be4a0bad1f6)

5 years agoMerge pull request #8831 from omoerbeek/backport-8826-to-rec-4.3.x rec-4.3.0-rc2
Otto Moerbeek [Mon, 17 Feb 2020 10:06:48 +0000 (11:06 +0100)] 
Merge pull request #8831 from omoerbeek/backport-8826-to-rec-4.3.x

rec: Backport 8826 to rec 4.3.x: Refuse NSEC records with a bitmap length > 32

5 years agoMerge pull request #8827 from omoerbeek/backport-8823-to-rec-4.3.x
Otto Moerbeek [Mon, 17 Feb 2020 10:06:25 +0000 (11:06 +0100)] 
Merge pull request #8827 from omoerbeek/backport-8823-to-rec-4.3.x

rec: Backport 8823 to rec 4.3.x: do continue rpz processing if the current policy is passthru

5 years agoRefuse NSEC records with a bitmap length > 32 8831/head
Remi Gacogne [Fri, 14 Feb 2020 13:40:33 +0000 (14:40 +0100)] 
Refuse NSEC records with a bitmap length > 32

(cherry picked from commit 3d51568b456205c9bd60ceeedb4b43af4a33f019)

5 years agoInit zone's d_priority field. 8827/head
Otto Moerbeek [Mon, 17 Feb 2020 08:41:45 +0000 (09:41 +0100)] 
Init zone's d_priority field.

5 years agoAdapt to somewhat older NetmaskTree
Otto Moerbeek [Fri, 14 Feb 2020 14:15:50 +0000 (15:15 +0100)] 
Adapt to somewhat older NetmaskTree

5 years agoRebased to handle NetmaskTree changes
Otto Moerbeek [Fri, 14 Feb 2020 12:46:21 +0000 (13:46 +0100)] 
Rebased to handle NetmaskTree changes

(cherry picked from commit 9bb0af0351594875cc3a8648e0f523cc666989be)

5 years agoFix compilation issue on older compilers
Otto Moerbeek [Fri, 14 Feb 2020 10:48:15 +0000 (11:48 +0100)] 
Fix compilation issue on older compilers

(cherry picked from commit 63464fee3f912b6b6c2d3df10321e17f1781cf6a)