]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
3 years agoA SHA-384 DS should not trump a SHA-256 one, so only potentially zap SHA-1 10912/head
Otto [Wed, 27 Oct 2021 10:01:09 +0000 (12:01 +0200)] 
A SHA-384 DS should not trump a SHA-256 one, so only potentially zap SHA-1

(cherry picked from commit a660ce6dbfc4182922eea8e548eb504af31b6cc1)

3 years agoMerge pull request #10863 from omoerbeek/backport-10842-to-rec-4.5.x
Otto Moerbeek [Tue, 19 Oct 2021 08:36:20 +0000 (10:36 +0200)] 
Merge pull request #10863 from omoerbeek/backport-10842-to-rec-4.5.x

rec: Backport 10842 to rec 4.5.x:  Put the right string into appliedPolicyTrigger for Netmask matching rules

3 years agoProcess review comments 10863/head
Otto [Mon, 18 Oct 2021 10:19:46 +0000 (12:19 +0200)] 
Process review comments

(cherry picked from commit e4387f4e74375699780175a75111eb32a1a3b039)

3 years agoAlso moved setting of hit value to find functions mostly.
Otto [Fri, 15 Oct 2021 10:07:29 +0000 (12:07 +0200)] 
Also moved setting of hit value to find functions mostly.

In a few cases (wildcard processing) the matched value is not the
hit as seen by the find function and an overide is needed.

(cherry picked from commit f9de1f7fd8e37ba91b8b4c85082b2f16c8890cba)

3 years agoProcess review comments and extend unit tests
Otto [Fri, 15 Oct 2021 09:48:20 +0000 (11:48 +0200)] 
Process review comments and extend unit tests

(cherry picked from commit 562c1c1db90709b5abf4d01fa6be319d6a48e971)

3 years agoAdd regression test
Otto [Wed, 13 Oct 2021 14:24:28 +0000 (16:24 +0200)] 
Add regression test

(cherry picked from commit 9524d9c1d12237dfc44f6a440dd9fc30d6c8b608)

3 years agoPut the right string into appliedPolicyTrigger for Netmask matching rules
Otto [Wed, 13 Oct 2021 13:45:16 +0000 (15:45 +0200)] 
Put the right string into appliedPolicyTrigger for Netmask matching rules
(ns, client, response). The NetMaskTree has it.

(cherry picked from commit b143b5f53285957a7230a6e192935a4a45f3454d)

3 years agoMerge pull request #10806 from omoerbeek/backport-10565-to-rec-4.5.x rec-4.5.6
Remi Gacogne [Thu, 7 Oct 2021 07:57:52 +0000 (09:57 +0200)] 
Merge pull request #10806 from omoerbeek/backport-10565-to-rec-4.5.x

rec: Backport 10565 to rec 4.5.x: Do not use DNSKEYs found below an apex for validation

3 years agoMerge pull request #10807 from omoerbeek/backport-10622-to-rec-4.5.x
Remi Gacogne [Thu, 7 Oct 2021 07:57:46 +0000 (09:57 +0200)] 
Merge pull request #10807 from omoerbeek/backport-10622-to-rec-4.5.x

rec: Backport 10622 to rec 4.5.x: Detect a loop when the denial of the DS comes from the child zone

3 years agoMerge pull request #10809 from omoerbeek/min-backport-10632-to-4.5.x
Remi Gacogne [Thu, 7 Oct 2021 07:57:39 +0000 (09:57 +0200)] 
Merge pull request #10809 from omoerbeek/min-backport-10632-to-4.5.x

Rec: Minimal Backport of 10632: match ordering of PacketID using the Birtdah vs non-Birtday comparator

3 years agoMerge pull request #10811 from omoerbeek/backport-10633-to-rec-4.5.x
Remi Gacogne [Thu, 7 Oct 2021 07:57:31 +0000 (09:57 +0200)] 
Merge pull request #10811 from omoerbeek/backport-10633-to-rec-4.5.x

rec: Backport 10633 to rec 4.5.x: Pass the Lua context to follow up queries (follow CNAME, dns64)

3 years agoMerge pull request #10813 from omoerbeek/backport-10718-to-rec-4.5.x
Remi Gacogne [Thu, 7 Oct 2021 07:57:23 +0000 (09:57 +0200)] 
Merge pull request #10813 from omoerbeek/backport-10718-to-rec-4.5.x

rec: Backport 10718 to rec 4.5.x: Only the DNAME records are authoritative in DNAME answers

3 years agoUpdate pdns/syncres.cc 10813/head
Remi Gacogne [Wed, 15 Sep 2021 13:13:34 +0000 (15:13 +0200)] 
Update pdns/syncres.cc

Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit 68a1512030b2e2fa721c17b010d5787a20951a1a)

3 years agorec: Only the DNAME records are authoritative in DNAME answers
Remi Gacogne [Mon, 13 Sep 2021 10:36:19 +0000 (12:36 +0200)] 
rec: Only the DNAME records are authoritative in DNAME answers

(cherry picked from commit 58655363e983054a265249aca8297eb6a5ed67af)

3 years agoReduce diff with branch 10811/head
Otto [Wed, 6 Oct 2021 09:13:17 +0000 (11:13 +0200)] 
Reduce diff with branch

3 years agorec: check that the policy event filter is called for follow-up queries
Remi Gacogne [Mon, 16 Aug 2021 15:45:18 +0000 (17:45 +0200)] 
rec: check that the policy event filter is called for follow-up queries

(cherry picked from commit 4037914713bb8893cb66f4dbba60addaeca20b02)

3 years agorec: Pass the Lua context to follow up queries (follow CNAME, dns64)
Remi Gacogne [Fri, 6 Aug 2021 07:51:49 +0000 (09:51 +0200)] 
rec: Pass the Lua context to follow up queries (follow CNAME, dns64)

(cherry picked from commit a4e9ad75186e883cdfcc87bc561a6e1f184d37f9)

3 years agoMinimal backport of #10632: match ordering of PacketID using the 10809/head
Otto [Wed, 6 Oct 2021 08:37:28 +0000 (10:37 +0200)] 
Minimal backport of #10632: match ordering of PacketID using the
Birtdah vs non-Birtday comparator

3 years agorec: Add a test for 'denial of the DS comes from the child zone' loop 10807/head
Remi Gacogne [Tue, 17 Aug 2021 09:33:16 +0000 (11:33 +0200)] 
rec: Add a test for 'denial of the DS comes from the child zone' loop

(cherry picked from commit 68ae8a86ab3943692fabeb134869e3d0a418dc03)

3 years agorec: Detect a loop when the denial of the DS comes from the child zone
Remi Gacogne [Sun, 1 Aug 2021 21:58:42 +0000 (23:58 +0200)] 
rec: Detect a loop when the denial of the DS comes from the child zone

(cherry picked from commit c3e96dca178cf355324ab34a08b3578e4fc44a31)

3 years agorec: do not use DNSKEYs found below an apex for validation, also from cache 10806/head
Peter van Dijk [Tue, 6 Jul 2021 14:47:43 +0000 (16:47 +0200)] 
rec: do not use DNSKEYs found below an apex for validation, also from cache

(cherry picked from commit 29ad87969c8a24fcc812ff4cb445a9e130d256ae)

3 years agorec: do not use DNSKEYs found below an apex for validation
Peter van Dijk [Mon, 5 Jul 2021 15:04:04 +0000 (17:04 +0200)] 
rec: do not use DNSKEYs found below an apex for validation

(cherry picked from commit 90b85dd0e7bfb7a21ab07f2ab9b31c616c6c62b9)

3 years agoMerge pull request #10803 from omoerbeek/backport-10768-to-rec-4.5.x
Otto Moerbeek [Wed, 6 Oct 2021 07:47:39 +0000 (09:47 +0200)] 
Merge pull request #10803 from omoerbeek/backport-10768-to-rec-4.5.x

rec: Backport 10768 to rec-4.5.x: Use the correct RPZ policy name when loading via XFR

3 years agorec: Use the correct RPZ policy name when loading via XFR 10803/head
Remi Gacogne [Tue, 28 Sep 2021 09:12:23 +0000 (11:12 +0200)] 
rec: Use the correct RPZ policy name when loading via XFR

This commit fixes two issues:
- if the existing zone name is not empty we should use it, instead of
  the zone domain
- if the zone domain has to be used, it should not include a final dot

(cherry picked from commit 3e86a970828dda814a140c9613311a8507c3c458)

3 years agoMerge pull request #10723 from omoerbeek/backport-10721-to-rec-4.5.x
Otto Moerbeek [Fri, 17 Sep 2021 14:40:46 +0000 (16:40 +0200)] 
Merge pull request #10723 from omoerbeek/backport-10721-to-rec-4.5.x

rec: Backport 10721 to rec 4.5.x: require nose >= 1.3.7 everywhere

3 years agorequire nose >= 1.3.7 everywhere 10723/head
Peter van Dijk [Tue, 14 Sep 2021 14:06:55 +0000 (16:06 +0200)] 
require nose >= 1.3.7 everywhere

(cherry picked from commit 8e8be088de0634fc561f5c7f6e26d6ed03f401e8)

3 years agoMerge pull request #10717 from omoerbeek/backport-10701-to-rec-4.5.x
Otto Moerbeek [Tue, 14 Sep 2021 06:41:15 +0000 (08:41 +0200)] 
Merge pull request #10717 from omoerbeek/backport-10701-to-rec-4.5.x

rec: Backport 10701 to rec-4.5.x: Fix the aggressive cache returning duplicated NSEC3 records

3 years agorec: Fix the aggressive cache returning duplicated NSEC3 records 10717/head
Remi Gacogne [Wed, 8 Sep 2021 09:11:53 +0000 (11:11 +0200)] 
rec: Fix the aggressive cache returning duplicated NSEC3 records

No need to include the same record twice when it provides, at the same
time, a proof that the closest encloser exists and that the next closer
does not, and/or that the wildcard does not exist either.
This happens right away in a zone with a single record, like reported
by Matt Nordhoff, but it might happen in other cases as well.

(cherry picked from commit eca47c4dd85d2711ebc26767dfa78bdbce2c7f16)

3 years agoMerge pull request #10655 from omoerbeek/backport-10643-to-rec-4.5.x
Otto Moerbeek [Mon, 13 Sep 2021 07:21:03 +0000 (09:21 +0200)] 
Merge pull request #10655 from omoerbeek/backport-10643-to-rec-4.5.x

rec: Backport 10643 to rec 4.5.x:  NS from the cache could be a forwarder

3 years agoMerge pull request #10680 from pieterlexis/backport-10407-to-rec-4.5.x
Pieter Lexis [Fri, 3 Sep 2021 12:36:16 +0000 (14:36 +0200)] 
Merge pull request #10680 from pieterlexis/backport-10407-to-rec-4.5.x

rec: Backport #10407; Debian Bullseye builder files

3 years agorecursor/debian-buster: remove obsolete dh-systemd Build-Depends 10680/head
Chris Hofstaedtler [Thu, 13 May 2021 14:58:37 +0000 (16:58 +0200)] 
recursor/debian-buster: remove obsolete dh-systemd Build-Depends

Merged into debhelper (>= 9.20160709)

(cherry picked from commit 58f41c5e304caf847c52a0951c2a5a4b9f6c02fb)

3 years agobuilder-support: add Debian bullseye dockerfiles
Chris Hofstaedtler [Thu, 13 May 2021 14:50:03 +0000 (16:50 +0200)] 
builder-support: add Debian bullseye dockerfiles

(cherry picked from commit ad53d76110228c6d0822b1b130e0bbe425872499)

3 years agoAlso check if the remoteIP is one of the IPs we would have forwarded to, 10655/head
Otto [Wed, 18 Aug 2021 07:24:45 +0000 (09:24 +0200)] 
Also check if the remoteIP is one of the IPs we would have forwarded to,
even if it's coming from the cache.

4 years agoIf we get an NS from the cache, it still could be one forwarding applies to.
Otto [Wed, 11 Aug 2021 11:14:37 +0000 (13:14 +0200)] 
If we get an NS from the cache, it still could be one forwarding applies to.
Take that into acount when determining dont-query status. Should fix #10638.

(cherry picked from commit c03df9bb6f8cd71a67ef9505fcafa27d514a68ad)

4 years agoMerge pull request #10629 from omoerbeek/backport-10627-to-rec-4.5.x
Otto Moerbeek [Mon, 9 Aug 2021 06:21:30 +0000 (08:21 +0200)] 
Merge pull request #10629 from omoerbeek/backport-10627-to-rec-4.5.x

rec: backport 10627 to rec 4.5.x: Check in more places if the policy has been updated before  using or modifying it.

4 years agoCheck in more places if the config policy has been updated before 10629/head
Otto [Tue, 3 Aug 2021 07:08:09 +0000 (09:08 +0200)] 
Check in more places if the config policy has been updated before
using or modifying it.

(cherry picked from commit 0c98e3de2cf1daae3f7034803668c1ac10fefe49)

4 years agoMerge pull request #10593 from rgacogne/rec45-aggressive-nsec3-ancestor rec-4.5.5
Otto Moerbeek [Wed, 28 Jul 2021 10:51:46 +0000 (12:51 +0200)] 
Merge pull request #10593 from rgacogne/rec45-aggressive-nsec3-ancestor

rec: Backport 10587 to rec-4.5.x: Ancestor NSEC3s can only deny the existence of a DS

4 years agoMerge pull request #10575 from omoerbeek/backport-10570-to-rec-4.5.x
Otto Moerbeek [Tue, 27 Jul 2021 14:12:00 +0000 (16:12 +0200)] 
Merge pull request #10575 from omoerbeek/backport-10570-to-rec-4.5.x

rec: Backport 10570 to rec 4.5.x: Make really sure we did not miss a cut on validation failure

4 years agorec: Fix wrong comments in the Aggressive NSEC cache unit tests 10593/head
Remi Gacogne [Mon, 19 Jul 2021 14:41:27 +0000 (16:41 +0200)] 
rec: Fix wrong comments in the Aggressive NSEC cache unit tests

(cherry picked from commit b48a269ae32e9f1bc80966fd4e72eeaba49e68f5)

4 years agoMerge pull request #10564 from omoerbeek/backport-10555-to-rec-4.5.x
Otto Moerbeek [Mon, 19 Jul 2021 11:52:22 +0000 (13:52 +0200)] 
Merge pull request #10564 from omoerbeek/backport-10555-to-rec-4.5.x

Backport 10555 to rec 4.5.x: Work around clueless servers sending AA=0 answers

4 years agoMerge pull request #10573 from omoerbeek/backport-10515-to-rec-4.5.x
Otto Moerbeek [Mon, 19 Jul 2021 09:15:06 +0000 (11:15 +0200)] 
Merge pull request #10573 from omoerbeek/backport-10515-to-rec-4.5.x

rec: Backport 10515 to rec-4.5.x: Clear the current proxy protocol values each iteration

4 years agorec: Fix formatting in test-aggressive_nsec_cc.cc
Remi Gacogne [Fri, 16 Jul 2021 08:09:03 +0000 (10:09 +0200)] 
rec: Fix formatting in test-aggressive_nsec_cc.cc

(cherry picked from commit 3b5159818fd7cd2792861be5d1cedfc128cf45f0)

4 years agorec: The root denies its own DS with a NSEC(3)s from the child zone
Remi Gacogne [Tue, 13 Jul 2021 16:29:50 +0000 (18:29 +0200)] 
rec: The root denies its own DS with a NSEC(3)s from the child zone

(cherry picked from commit ae727ae2b1b74a113175e58b5c5bcbc42d242cf1)

4 years agorec: Check that NSEC(3)s from the child zone are not used to deny the DS
Remi Gacogne [Tue, 13 Jul 2021 14:57:40 +0000 (16:57 +0200)] 
rec: Check that NSEC(3)s from the child zone are not used to deny the DS

(cherry picked from commit 48c547485785861551a7fdfb39b8678ea49e8019)

4 years agorec: Fix the NSEC3 ancestor check for DS in the aggressive cache
Remi Gacogne [Tue, 13 Jul 2021 12:55:47 +0000 (14:55 +0200)] 
rec: Fix the NSEC3 ancestor check for DS in the aggressive cache

(cherry picked from commit 1eed7f4572d396b544756cf93be2297db23483b3)

4 years agorec: Ancestor NSEC3s can only deny the existence of a DS
Remi Gacogne [Tue, 13 Jul 2021 09:56:00 +0000 (11:56 +0200)] 
rec: Ancestor NSEC3s can only deny the existence of a DS

Before that commit, the aggressive NSEC(3) cache could have
mistakenly used NSEC3s from the parent zone to prove that a given
name in the child zone did not exist, which is incorrect.
It happened because we did not properly detect that the NSEC3 for
the closest encloser was an ancestor NSEC3 indicating a delegation,
and then in the unlikely but possible case that we found a NSEC3
from the parent zone whose hashes covered the next closer we wrongly
concluded that the name did not exist, returning a NXDomain with an
invalid proof of denial.

(cherry picked from commit d270600bf4d310dcdc3d422ecc9be6d8210e7849)

4 years agos/qtype.toString()/qtype.getName() for backport 10575/head
Otto [Wed, 7 Jul 2021 13:12:14 +0000 (15:12 +0200)] 
s/qtype.toString()/qtype.getName() for backport

4 years agorec: Add a 'checking for missed cuts' loop unit test
Remi Gacogne [Wed, 7 Jul 2021 09:56:13 +0000 (11:56 +0200)] 
rec: Add a 'checking for missed cuts' loop unit test

(cherry picked from commit c8f77a00dc454bdc17f8208d9bedcff519ad78f0)

4 years agorec: Avoid a loop when checking if we missed a cut
Remi Gacogne [Tue, 4 May 2021 13:16:20 +0000 (15:16 +0200)] 
rec: Avoid a loop when checking if we missed a cut

We just went Bogus because of the signer, not because of
the name currently being checked, so we only need to check
the status of zones above the signer. Moreover, if we went
Bogus because of the DS of the signer, we should even skip
the zone of the signer but check for a missed cut above that.

(cherry picked from commit f237dbd53b8b796a94782a27ab237936e09d7a70)

4 years agorec: Add unit tests for signed, broken but insecure zones
Remi Gacogne [Tue, 6 Jul 2021 10:18:15 +0000 (12:18 +0200)] 
rec: Add unit tests for signed, broken but insecure zones

(cherry picked from commit 0970c1a2f06aba653aa752a7431f21f8013310f6)

4 years agorec: Make really sure we did not miss a cut on validation failure
Remi Gacogne [Mon, 5 Jul 2021 16:01:37 +0000 (18:01 +0200)] 
rec: Make really sure we did not miss a cut on validation failure

(cherry picked from commit bc50925a50c6e956f612bb03db15893279fd052d)

4 years agorec: Fix NSEC3 next owner in SyncRes unit tests
Remi Gacogne [Mon, 5 Jul 2021 16:00:37 +0000 (18:00 +0200)] 
rec: Fix NSEC3 next owner in SyncRes unit tests

(cherry picked from commit 95f79e18e5fd5bf62970d024810d52e1bf0cd687)

4 years agoClear the current proxy protocol values each iteration 10573/head
Otto [Mon, 21 Jun 2021 13:14:46 +0000 (15:14 +0200)] 
Clear the current proxy protocol values each iteration

(cherry picked from commit b2b8ccea95ddde5cd170afef57ba8eeced3d1d0e)

4 years agorec: Add a unit test checking that DNSSEC validation is done for AA=0 answers 10564/head
Remi Gacogne [Fri, 2 Jul 2021 09:48:14 +0000 (11:48 +0200)] 
rec: Add a unit test checking that DNSSEC validation is done for AA=0 answers

(cherry picked from commit 3f3b008644f81e6500eb031c2aab2be962b5aed8)

4 years agorec: Work around clueless servers sending AA=0 answers
Remi Gacogne [Fri, 2 Jul 2021 08:30:43 +0000 (10:30 +0200)] 
rec: Work around clueless servers sending AA=0 answers

(cherry picked from commit 7b98cc14e66493599c7bac1bee26c3d116a660a6)

4 years agoMerge pull request #10540 from omoerbeek/backport-10455-to-rec-4.5.x rec-4.5.4
Otto Moerbeek [Wed, 30 Jun 2021 09:02:55 +0000 (11:02 +0200)] 
Merge pull request #10540 from omoerbeek/backport-10455-to-rec-4.5.x

rec: Backport 10455 to rec-4.5.x: builder rpmbuild: run yum upgrade first

4 years agobuilder rpmbuild: run yum upgrade first 10540/head
Peter van Dijk [Thu, 27 May 2021 16:04:46 +0000 (18:04 +0200)] 
builder rpmbuild: run yum upgrade first

(cherry picked from commit 912729cf22c5303fa4e0136a639132ca940a186f)

4 years agoMerge pull request #10519 from omoerbeek/rec-backport-10518-to-4.5.x rec-4.5.3
Otto Moerbeek [Wed, 23 Jun 2021 12:36:15 +0000 (14:36 +0200)] 
Merge pull request #10519 from omoerbeek/rec-backport-10518-to-4.5.x

rec: Backport of 10518 to 4.5.x: Make sure that we pass the SOA along the NSEC(3) proof for DS queries

4 years agorec: Check that we get the SOA on a direct query for a non-existing DS 10519/head
Remi Gacogne [Wed, 23 Jun 2021 09:25:15 +0000 (11:25 +0200)] 
rec: Check that we get the SOA on a direct query for a non-existing DS

In a regression test this time.

4 years agorec: Check that we get the SOA on a direct query for a non-existing DS
Remi Gacogne [Wed, 23 Jun 2021 08:54:05 +0000 (10:54 +0200)] 
rec: Check that we get the SOA on a direct query for a non-existing DS

4 years agoBackport of #10518: Make sure that we pass the SOA along the NSEC(3) proof for DS...
Otto [Wed, 23 Jun 2021 08:40:24 +0000 (10:40 +0200)] 
Backport of #10518: Make sure that we pass the SOA along the NSEC(3) proof for DS queries

4 years agoMerge pull request #10477 from omoerbeek/backport-10440-to-rec-4.5.x rec-4.5.2
Otto Moerbeek [Mon, 7 Jun 2021 11:54:06 +0000 (13:54 +0200)] 
Merge pull request #10477 from omoerbeek/backport-10440-to-rec-4.5.x

Backport 10440 to rec 4.5.x: Change nsec3-max-iterations default to 150

4 years agoMerge pull request #10476 from omoerbeek/backport-10460-to-rec-4.5.x
Otto Moerbeek [Mon, 7 Jun 2021 11:53:51 +0000 (13:53 +0200)] 
Merge pull request #10476 from omoerbeek/backport-10460-to-rec-4.5.x

rec: Backport 10460 to rec 4.5.x: Don't follow referral from the parent to the child for DS queries

4 years agoMerge pull request #10475 from omoerbeek/backport-10426-to-rec-4.5.x
Otto Moerbeek [Mon, 7 Jun 2021 11:53:35 +0000 (13:53 +0200)] 
Merge pull request #10475 from omoerbeek/backport-10426-to-rec-4.5.x

rec: Backport of #10426 to rec-4.5.x: When refreshing, do not consider root almost expired

4 years agoMerge pull request #10474 from omoerbeek/backport-10396-to-rec-4.5.x
Otto Moerbeek [Mon, 7 Jun 2021 11:53:20 +0000 (13:53 +0200)] 
Merge pull request #10474 from omoerbeek/backport-10396-to-rec-4.5.x

rec: Backport 10396 to rec-4.5.x: Take into account q_quiet when determing loglevel and change a few loglevels.

4 years agoMerge pull request #10473 from omoerbeek/backport-10350-to-rec-4.5.x
Otto Moerbeek [Mon, 7 Jun 2021 11:53:04 +0000 (13:53 +0200)] 
Merge pull request #10473 from omoerbeek/backport-10350-to-rec-4.5.x

rec: Backport of 10350 to rex-4.5.x: Only add the NSEC and RRSIG records once in wildcard NODATA answers

4 years agoMention correct version now that this is backported. 10477/head
Otto [Mon, 7 Jun 2021 07:39:20 +0000 (09:39 +0200)] 
Mention correct version now that this is backported.

4 years agorec: Cleaner way of handling a referral to a child zone for DS queries 10476/head
Remi Gacogne [Wed, 2 Jun 2021 14:29:40 +0000 (16:29 +0200)] 
rec: Cleaner way of handling a referral to a child zone for DS queries

(cherry picked from commit 18dc3b3d9be3f8d7095b8f9eb2a8fb8d2b79bcba)

4 years agorec: Also test for the "referral to child on DS query" case in a Secure zone
Remi Gacogne [Wed, 2 Jun 2021 14:26:14 +0000 (16:26 +0200)] 
rec: Also test for the "referral to child on DS query" case in a Secure zone

(cherry picked from commit 46b17d4b0fac8d46793eedfb078e82788cca63a9)

4 years agorec: Fix a typo in a comment
Remi Gacogne [Wed, 2 Jun 2021 13:02:42 +0000 (15:02 +0200)] 
rec: Fix a typo in a comment

(cherry picked from commit d64186873181a040864441f257bfc0ba78505456)

4 years agorec: Add a unit test for the "referral to child on DS query" case
Remi Gacogne [Wed, 2 Jun 2021 13:00:32 +0000 (15:00 +0200)] 
rec: Add a unit test for the "referral to child on DS query" case

(cherry picked from commit 3fbb129c0372c8c9ae375e647e7a5980b2d2006b)

4 years agorec: Don't follow referral from the parent to the child for DS queries
Remi Gacogne [Mon, 31 May 2021 15:00:18 +0000 (17:00 +0200)] 
rec: Don't follow referral from the parent to the child for DS queries

It happens if the server does not know about the DS special case.
Treat the delegation as a unsigned NODATA answer in that case.

For example for sthc.nordlo.cloud we go from the existing:

```
[1]   sthc.nordlo.cloud: Resolved 'nordlo.cloud' NS ns2.zetup.se to: 159.253.27.75
[1]   sthc.nordlo.cloud: Trying IP 159.253.27.75:53, asking 'sthc.nordlo.cloud|DS'
[1]   sthc.nordlo.cloud: Got 3 answers from ns2.zetup.se (159.253.27.75), rcode=0 (No Error), aa=0, in 35ms
[1]   sthc.nordlo.cloud: accept answer 'sthc.nordlo.cloud|NS|ns2.loopia.se.' from 'nordlo.cloud' nameservers? ttl=3600, place=2 YES!
[1]   sthc.nordlo.cloud: accept answer 'sthc.nordlo.cloud|NS|ns1.loopia.se.' from 'nordlo.cloud' nameservers? ttl=3600, place=2 YES!
[1]   sthc.nordlo.cloud: OPT answer '.' from 'nordlo.cloud' nameservers
[1]   sthc.nordlo.cloud: determining status after receiving this packet
[1]   sthc.nordlo.cloud: got NS record 'sthc.nordlo.cloud' -> 'ns2.loopia.se.'
[1]   sthc.nordlo.cloud: got NS record 'sthc.nordlo.cloud' -> 'ns1.loopia.se.'
[1]   sthc.nordlo.cloud: status=did not resolve, got 2 NS, looping to them
[1]   sthc.nordlo.cloud.: Nameservers: ns1.loopia.se(37.85ms), ns2.loopia.se(38.26ms)
[1]   sthc.nordlo.cloud: Trying to resolve NS 'ns1.loopia.se' (1/2)
[1]   Nameserver ns1.loopia.se IPs: 93.188.0.20(37.85ms)
[1]   sthc.nordlo.cloud: Resolved 'sthc.nordlo.cloud' NS ns1.loopia.se to: 93.188.0.20
[1]   sthc.nordlo.cloud: Trying IP 93.188.0.20:53, asking 'sthc.nordlo.cloud|DS'
```

to:

```
[1]   sthc.nordlo.cloud: Resolved 'nordlo.cloud' NS ns2.zetup.se to: 159.253.27.75
[1]   sthc.nordlo.cloud: Trying IP 159.253.27.75:53, asking 'sthc.nordlo.cloud|DS'
[1]   sthc.nordlo.cloud: Got 3 answers from ns2.zetup.se (159.253.27.75), rcode=0 (No Error), aa=0, in 35ms
[1]   sthc.nordlo.cloud: accept answer 'sthc.nordlo.cloud|NS|ns2.loopia.se.' from 'nordlo.cloud' nameservers? ttl=3600, place=2 YES!
[1]   sthc.nordlo.cloud: accept answer 'sthc.nordlo.cloud|NS|ns1.loopia.se.' from 'nordlo.cloud' nameservers? ttl=3600, place=2 YES!
[1]   sthc.nordlo.cloud: OPT answer '.' from 'nordlo.cloud' nameservers
[1]   sthc.nordlo.cloud: determining status after receiving this packet
[1]   sthc.nordlo.cloud: got NS record 'sthc.nordlo.cloud' -> 'ns2.loopia.se.'
[1]   sthc.nordlo.cloud: got (implicit) negative indication of DS record for 'sthc.nordlo.cloud'
[1]   sthc.nordlo.cloud: got NS record 'sthc.nordlo.cloud' -> 'ns1.loopia.se.'
[1]   sthc.nordlo.cloud: status=noerror, other types may exist, but we are done (have negative SOA)
[1] : no signatures for sthc.nordlo.cloud, we likely missed a cut between cloud and nordlo.cloud, looking for it
```

(cherry picked from commit 96c6c0755e14c77aee0152679e12194e5e7fcb04)

4 years agoChange nsec3-max-iterations default to 150
Otto [Tue, 25 May 2021 14:17:40 +0000 (16:17 +0200)] 
Change nsec3-max-iterations default to 150

(cherry picked from commit 2a93a7c4fe2be264268bf18f3267ad8f89b665d4)

4 years agorec: Backport of #10426 to rec-4.5.x: When refreshing, do not consider root almost... 10475/head
Otto [Mon, 7 Jun 2021 07:19:38 +0000 (09:19 +0200)] 
rec: Backport of #10426 to rec-4.5.x: When refreshing, do not consider root almost expired

4 years agoTake into account q_quiet when determing loglevel and change a few 10474/head
Otto [Wed, 12 May 2021 10:46:44 +0000 (12:46 +0200)] 
Take into account q_quiet when determing loglevel and change a few
loglevels.

(cherry picked from commit cf02f990a7fb9398aa4b13373c7ae35f7d2d47e3)

4 years agorec: Only add the NSEC and RRSIG records once in wildcard NODATA answers 10473/head
Remi Gacogne [Mon, 3 May 2021 13:00:04 +0000 (15:00 +0200)] 
rec: Only add the NSEC and RRSIG records once in wildcard NODATA answers

For wildcard-expanded answers we need to collect the proof that the
exact name does not exist and add them to the response. We also
collect that proof for negative answers.
When the answer is a wildcard-expanded NODATA, we only need to collect
them once, not twice.

(cherry picked from commit d89f023d1bd6ae7d0eb6d72e7b2771363f5e4f79)

4 years agoMerge pull request #10422 from omoerbeek/rec-backport-10420-to-4.5.x
Otto Moerbeek [Wed, 19 May 2021 08:34:59 +0000 (10:34 +0200)] 
Merge pull request #10422 from omoerbeek/rec-backport-10420-to-4.5.x

Rec: backport 10420 to 4.5.x: For the NOD lookup case, we don't want QName Minimization.

4 years agoBackport of #10420 to rec 4.5.x 10422/head
Otto [Tue, 18 May 2021 14:59:23 +0000 (16:59 +0200)] 
Backport of #10420 to rec 4.5.x

4 years agoMerge pull request #10378 from omoerbeek/rel/rec-4.5.x rec-4.5.1
Otto Moerbeek [Mon, 10 May 2021 13:02:16 +0000 (15:02 +0200)] 
Merge pull request #10378 from omoerbeek/rel/rec-4.5.x

rec 4.5.x: Add missing fuzzing corpus files

4 years agoMerge pull request #10377 from omoerbeek/backport-10375-to-rec-4.5.x
Otto Moerbeek [Mon, 10 May 2021 13:02:02 +0000 (15:02 +0200)] 
Merge pull request #10377 from omoerbeek/backport-10375-to-rec-4.5.x

rec: Backport 10375 to rec-4.5.x: Prevent a race in the aggressive NSEC cache

4 years agoAdd missing fuzzing corpus files 10378/head
Otto [Mon, 10 May 2021 11:30:25 +0000 (13:30 +0200)] 
Add missing fuzzing corpus files

4 years agorec: Prevent a race in the aggressive NSEC cache 10377/head
Remi Gacogne [Fri, 7 May 2021 15:25:01 +0000 (17:25 +0200)] 
rec: Prevent a race in the aggressive NSEC cache

When a new NSEC3 record has a different salt than the one we know, we
update the zone entry with the new salt. Unfortunately, that salt was
read without holding the lock in `AggressiveNSECCache::getNSEC3Denial`,
leading to a possible data race.

(cherry picked from commit 779f35b41c758bed9215d51df4fc3a69edbada9d)

4 years agoMerge pull request #10366 from omoerbeek/backport-10353-to-rec-4.5.x rec-4.5.0
Otto Moerbeek [Fri, 7 May 2021 07:48:00 +0000 (09:48 +0200)] 
Merge pull request #10366 from omoerbeek/backport-10353-to-rec-4.5.x

rec: Backport 10353 to rec 4.5.x: Apply dns64 on RPZ hits generated after a gettag_ffi hit

4 years agorec: Test the most simple condition first 10366/head
Remi Gacogne [Tue, 4 May 2021 16:30:47 +0000 (18:30 +0200)] 
rec: Test the most simple condition first

Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit 89461c55042e1f0f7d17a511ae3d6c7c39602954)

4 years agorec: Add a regression test for gettag_ffi, RPZ and DNS64 interaction
Remi Gacogne [Tue, 4 May 2021 12:56:40 +0000 (14:56 +0200)] 
rec: Add a regression test for gettag_ffi, RPZ and DNS64 interaction

(cherry picked from commit 76b47869c7902da25036c76ec4cd98fe23a51827)

4 years agorec: Apply dns64 on RPZ hits generated after a gettag_ffi hit
Remi Gacogne [Tue, 4 May 2021 10:29:32 +0000 (12:29 +0200)] 
rec: Apply dns64 on RPZ hits generated after a gettag_ffi hit

We do special case the qname RPZ processing after a gettag_ffi hit,
leading to dns64 to not be applied in that case. This commit adds
dns64 handling to the special case.

(cherry picked from commit 92f829c42ef82b6d5d0804886519536137925f23)

4 years agoMerge pull request #10335 from omoerbeek/backport-10329-to-rec-4.5.x rec-4.5.0-rc1
Otto Moerbeek [Mon, 26 Apr 2021 09:14:28 +0000 (11:14 +0200)] 
Merge pull request #10335 from omoerbeek/backport-10329-to-rec-4.5.x

rec: Backport of 10329 to rec-4.5.x: boost 1.76 containers: use standard exceptions

4 years agoMerge pull request #10334 from omoerbeek/backport-10318-to-rec-4.5.x
Otto Moerbeek [Mon, 26 Apr 2021 09:14:14 +0000 (11:14 +0200)] 
Merge pull request #10334 from omoerbeek/backport-10318-to-rec-4.5.x

rec: Backport 10318 to rec-4.5.x: Fix typo in edns-padding-tag help

4 years agoMerge pull request #10333 from omoerbeek/backport-10312-to-rec-4.5.x
Otto Moerbeek [Mon, 26 Apr 2021 09:14:00 +0000 (11:14 +0200)] 
Merge pull request #10333 from omoerbeek/backport-10312-to-rec-4.5.x

rec: Backport 10312 to rec 4.5.x: improve packet cache sizeing now that TCP answers are also cached

4 years agoboost 1.76 containers: use standard exceptions 10335/head
Peter van Dijk [Fri, 23 Apr 2021 13:40:43 +0000 (15:40 +0200)] 
boost 1.76 containers: use standard exceptions

(cherry picked from commit 311f26839819062ced8697686372b6c6b2210bdf)

4 years agorec: Fix typo in edns-padding-tag help 10334/head
Matt Nordhoff [Tue, 20 Apr 2021 13:41:42 +0000 (13:41 +0000)] 
rec: Fix typo in edns-padding-tag help

(cherry picked from commit 07e8ae03d1ec61f6d8f2577cf16a76889bbdd832)

4 years agotypo 10333/head
Otto Moerbeek [Wed, 21 Apr 2021 09:01:56 +0000 (11:01 +0200)] 
typo

Co-authored-by: Remi Gacogne <github@coredump.fr>
(cherry picked from commit 693b9c55afb04e1774a9086074986c910a7eaf20)

4 years agoImprove packet cache sizing.
Otto [Mon, 19 Apr 2021 14:44:43 +0000 (16:44 +0200)] 
Improve packet cache sizing.

Since queries incoming over TCP are now also using the packet
cache, there is now also one packet cache instance per distributor
thread. Each cache instance has a size of max-packetcache-entries
divided by (threads + distributor-threads).

(cherry picked from commit 5c367a7e8c69311998737914270386618eb9e1d2)

4 years agoMerge pull request #10320 from omoerbeek/backport-10317-to-rec-4.5.x
Otto Moerbeek [Wed, 21 Apr 2021 09:03:08 +0000 (11:03 +0200)] 
Merge pull request #10320 from omoerbeek/backport-10317-to-rec-4.5.x

rec: Backport 10317 to rec 4.5.x: Do not put results of DS query for auth or forward domains in negcache

4 years agoMerge pull request #10319 from omoerbeek/backport-10303-to-rec-4.5.x
Otto Moerbeek [Wed, 21 Apr 2021 09:02:48 +0000 (11:02 +0200)] 
Merge pull request #10319 from omoerbeek/backport-10303-to-rec-4.5.x

rec: Backport 10303 to rec 4.5.x: Use the correct ECS address when proxy-protocol is enabled

4 years agoAlso check query type 10320/head
Otto [Tue, 20 Apr 2021 11:52:38 +0000 (13:52 +0200)] 
Also check query type

(cherry picked from commit 660a62d41320e484387e3d4671ec36cf0d07b942)

4 years agoAdd test case
Otto [Tue, 20 Apr 2021 11:32:26 +0000 (13:32 +0200)] 
Add test case

(cherry picked from commit a990990b951c843aafcd89a536eb9c8972f05624)

4 years agoDo not put results of DS query for auth or forward domains in negcache.
Otto [Tue, 6 Apr 2021 11:20:36 +0000 (13:20 +0200)] 
Do not put results of DS query for auth or forward domains in negcache.

Should fix #10189.

(cherry picked from commit 6fa3df17b1fd369020601e804ee98e2e2c2882f0)

4 years agorec: Fix the proxy protocol regression tests 10319/head
Remi Gacogne [Mon, 19 Apr 2021 12:06:26 +0000 (14:06 +0200)] 
rec: Fix the proxy protocol regression tests

(cherry picked from commit 1d3ea4cf67b5e1565ed619f5015420481e1c87f3)

4 years agorec: Replace deprecated edns-subnet-whitelist with edns-subnet-allow-list
Remi Gacogne [Mon, 19 Apr 2021 09:15:43 +0000 (11:15 +0200)] 
rec: Replace deprecated edns-subnet-whitelist with edns-subnet-allow-list

(cherry picked from commit 3be6dde85dda49352642681813753454e5f41525)