]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
17 months agoRemove unused `now` argument from addRecordToRRSet 12571/head
Otto Moerbeek [Wed, 5 Apr 2023 08:07:00 +0000 (10:07 +0200)] 
Remove unused `now` argument from addRecordToRRSet

17 months agoFix cases mentioned in review, plus a few spotted on macOS
Otto Moerbeek [Tue, 4 Apr 2023 14:23:20 +0000 (16:23 +0200)] 
Fix cases mentioned in review, plus a few spotted on macOS

17 months agorec: Remove -Wno-unused-parameter from default C(XX)FLAGS
Fred Morcos [Mon, 20 Feb 2023 10:59:53 +0000 (11:59 +0100)] 
rec: Remove -Wno-unused-parameter from default C(XX)FLAGS

17 months agorec: Fix unused parameter warnings
Fred Morcos [Fri, 17 Feb 2023 12:38:00 +0000 (13:38 +0100)] 
rec: Fix unused parameter warnings

17 months agoMerge pull request #12717 from omoerbeek/rec-regr-threads
Otto Moerbeek [Wed, 5 Apr 2023 05:58:37 +0000 (07:58 +0200)] 
Merge pull request #12717 from omoerbeek/rec-regr-threads

rec: bulk tests (with their one client driving the test) do not work well with reuseport=yes and many workers

17 months agoThe bulk tests (with it's one client) do not work well with reuseport=yes and many... 12717/head
Otto Moerbeek [Tue, 4 Apr 2023 10:01:30 +0000 (12:01 +0200)] 
The bulk tests (with it's one client) do not work well with reuseport=yes and many workers

Use (the now non-default) reuseport=no

17 months agoMerge pull request #12594 from omoerbeek/rec-packetcache-sharded
Otto Moerbeek [Tue, 4 Apr 2023 09:01:14 +0000 (11:01 +0200)] 
Merge pull request #12594 from omoerbeek/rec-packetcache-sharded

Rec: sharded and shared packet cache

17 months agoMerge pull request #12710 from omoerbeek/rcodesenum
Otto Moerbeek [Tue, 4 Apr 2023 08:29:36 +0000 (10:29 +0200)] 
Merge pull request #12710 from omoerbeek/rcodesenum

Cleanup rcode enums: base one is 8 bit unsigned, extended one 16 bit unsigned

17 months agoMerge pull request #12716 from omoerbeek/rec-debian-build
Otto Moerbeek [Tue, 4 Apr 2023 07:33:26 +0000 (09:33 +0200)] 
Merge pull request #12716 from omoerbeek/rec-debian-build

rec: followup to #10072: add missing boost-filesystem dependency

17 months agoMore consistent naming and some general clang-tidy cleanup 12594/head
Otto Moerbeek [Tue, 4 Apr 2023 07:23:59 +0000 (09:23 +0200)] 
More consistent naming and some general clang-tidy cleanup

17 months agoAlso enable NOD explictly in spec file 12716/head
Otto Moerbeek [Tue, 4 Apr 2023 06:52:02 +0000 (08:52 +0200)] 
Also enable NOD explictly in spec file

17 months agorec: followup to #10072: add missing boost-filesystem dependency
Otto Moerbeek [Tue, 4 Apr 2023 06:45:52 +0000 (08:45 +0200)] 
rec: followup to #10072: add missing boost-filesystem dependency

Fixes #12715: NOD functionality was lost due to a missing boost-filesystem dependency.
Add the dependency and explicitly enable NOD.

17 months agoChange defaults to pdns-distributes-queries = no and reuseport = yes
Otto Moerbeek [Mon, 3 Apr 2023 09:14:00 +0000 (11:14 +0200)] 
Change defaults to pdns-distributes-queries = no and reuseport = yes

17 months agoAnother case of a test calling the API before it is ready
Otto Moerbeek [Wed, 22 Mar 2023 09:53:00 +0000 (10:53 +0100)] 
Another case of a test calling the API before it is ready

17 months agoA separate setting for packet cache shards.
Otto Moerbeek [Fri, 17 Mar 2023 13:09:00 +0000 (14:09 +0100)] 
A separate setting for packet cache shards.

17 months agoTweaks
Otto Moerbeek [Mon, 27 Feb 2023 14:14:14 +0000 (15:14 +0100)] 
Tweaks

17 months agoStop disabling packet cache for bulk tests
Otto Moerbeek [Mon, 27 Feb 2023 14:11:08 +0000 (15:11 +0100)] 
Stop disabling packet cache for bulk tests

17 months agoAccount for size per shard
Otto Moerbeek [Mon, 27 Feb 2023 10:29:46 +0000 (11:29 +0100)] 
Account for size per shard

17 months agoAdd contention info about PC in stats report
Otto Moerbeek [Mon, 27 Feb 2023 09:37:11 +0000 (10:37 +0100)] 
Add contention info about PC in stats report

17 months agoAdd contention/acquired stats to sharded packet cache
Otto Moerbeek [Fri, 24 Feb 2023 10:32:22 +0000 (11:32 +0100)] 
Add contention/acquired stats to sharded packet cache

17 months agoInitial integration with recursor
Otto Moerbeek [Wed, 22 Feb 2023 15:30:48 +0000 (16:30 +0100)] 
Initial integration with recursor

17 months agoMake packet cache sharded
Otto Moerbeek [Wed, 22 Feb 2023 15:03:41 +0000 (16:03 +0100)] 
Make packet cache sharded

Unit test run fine, but recursor itself has not been adapted yet

17 months agoCleanup
Otto Moerbeek [Wed, 22 Feb 2023 13:53:08 +0000 (14:53 +0100)] 
Cleanup

17 months agoMerge pull request #12709 from omoerbeek/rec-pc-neg-vs-servfail
Otto Moerbeek [Mon, 3 Apr 2023 11:12:05 +0000 (13:12 +0200)] 
Merge pull request #12709 from omoerbeek/rec-pc-neg-vs-servfail

rec: More fine grained capping of packet cache TTL

17 months agoMerge pull request #12698 from omoerbeek/rec-synthesized
Otto Moerbeek [Mon, 3 Apr 2023 11:10:46 +0000 (13:10 +0200)] 
Merge pull request #12698 from omoerbeek/rec-synthesized

rec: Start using newly assigned "Synthesized" EDE

17 months agoMerge pull request #12655 from omoerbeek/rec-hints-names
Otto Moerbeek [Mon, 3 Apr 2023 11:10:24 +0000 (13:10 +0200)] 
Merge pull request #12655 from omoerbeek/rec-hints-names

Rec: rework root priming code to allow multiple addresses per NS

17 months agoMerge pull request #10072 from zeha/debian-update-rec
Otto Moerbeek [Mon, 3 Apr 2023 10:29:44 +0000 (12:29 +0200)] 
Merge pull request #10072 from zeha/debian-update-rec

Update Debian packaging for Recursor

17 months agoAdd test, with some reorganization as reczones is not linked into testrunner. 12655/head
Otto Moerbeek [Mon, 3 Apr 2023 10:18:02 +0000 (12:18 +0200)] 
Add test, with some reorganization as reczones is not linked into testrunner.

So move a few functions to reczones-helpers.cc

17 months agoRefactor of root priming code
Otto Moerbeek [Mon, 6 Feb 2023 07:57:31 +0000 (08:57 +0100)] 
Refactor of root priming code

17 months agorec: process hints with multiple addresses per name correctly.
Otto Moerbeek [Wed, 1 Feb 2023 12:44:47 +0000 (13:44 +0100)] 
rec: process hints with multiple addresses per name correctly.

Fixes #12486

17 months agoChange default packet TTL to 24 hours 12709/head
Otto Moerbeek [Mon, 3 Apr 2023 08:57:46 +0000 (10:57 +0200)] 
Change default packet TTL to 24 hours

17 months agoMerge pull request #12497 from jsoref/shorthands-for-seconds
Otto Moerbeek [Mon, 3 Apr 2023 08:24:36 +0000 (10:24 +0200)] 
Merge pull request #12497 from jsoref/shorthands-for-seconds

Shorthands for seconds

17 months agoRegression tests should use new EDE 12698/head
Otto Moerbeek [Mon, 3 Apr 2023 07:20:12 +0000 (09:20 +0200)] 
Regression tests should use new EDE

17 months agoMerge pull request #12708 from aerique/bugfix/dnsdist-18-eol
Otto Moerbeek [Mon, 3 Apr 2023 06:22:35 +0000 (08:22 +0200)] 
Merge pull request #12708 from aerique/bugfix/dnsdist-18-eol

Fix EOL table for DNSdist.

17 months agoMerge pull request #12707 from Habbie/ywh
Otto Moerbeek [Mon, 3 Apr 2023 06:22:07 +0000 (08:22 +0200)] 
Merge pull request #12707 from Habbie/ywh

change hackerone references to point to yeswehack

17 months agoMerge pull request #12705 from hlindqvist/pdnsrec-perf-notrack-tcp-reminder
Otto Moerbeek [Mon, 3 Apr 2023 06:20:14 +0000 (08:20 +0200)] 
Merge pull request #12705 from hlindqvist/pdnsrec-perf-notrack-tcp-reminder

Add reminders for 53/tcp rules in the NOTRACK example rules in pdns-rec docs

17 months agoCleanup rcodes enums: base one is 8 bit unisgned, extended one 16 bit unsigned 12710/head
Otto Moerbeek [Fri, 31 Mar 2023 11:36:04 +0000 (13:36 +0200)] 
Cleanup rcodes enums: base one is 8 bit unisgned, extended one 16 bit unsigned

17 months agoMore fine grained capping of packet cache TTL
Otto Moerbeek [Fri, 31 Mar 2023 08:02:31 +0000 (10:02 +0200)] 
More fine grained capping of packet cache TTL

Distinguish between negative answers (NxDomain and NoData), failure to resolve
(ServFail and completely empty answers) and ordinary answers when capping the
packet cache TTL. A new setting (packetcache-negative-ttl) is created for that.

NoData is: empty answer section but SOA record present in authority section.

17 months agoFix EOL table for DNSdist. 12708/head
Erik Winkels [Thu, 30 Mar 2023 14:23:04 +0000 (16:23 +0200)] 
Fix EOL table for DNSdist.

17 months agochange hackerone references to point to yeswehack 12707/head
Peter van Dijk [Thu, 30 Mar 2023 14:03:49 +0000 (16:03 +0200)] 
change hackerone references to point to yeswehack

17 months agoMerge pull request #12692 from rgacogne/ddist180-changelog-secpoll
aerique [Thu, 30 Mar 2023 13:12:18 +0000 (15:12 +0200)] 
Merge pull request #12692 from rgacogne/ddist180-changelog-secpoll

dnsdist: Prepare ChangeLog and secpoll update for 1.8.0

17 months agodnsdist: Prepare ChangeLog and secpoll update for 1.8.0 12692/head
Erik Winkels [Thu, 30 Mar 2023 11:17:16 +0000 (13:17 +0200)] 
dnsdist: Prepare ChangeLog and secpoll update for 1.8.0

17 months agoMerge pull request #12706 from san983/master
Peter van Dijk [Thu, 30 Mar 2023 07:52:55 +0000 (09:52 +0200)] 
Merge pull request #12706 from san983/master

Fixes a typo in pdnsutil clear-zone help output

17 months agoFixes a typo in pdnsutil clear-zone help output 12706/head
Santiago Traversa [Thu, 30 Mar 2023 03:39:02 +0000 (00:39 -0300)] 
Fixes a typo in pdnsutil clear-zone help output

from
# pdnsutil clear-zone foo bar
Syntax: pdnsutil edit-zone ZONE

to
# pdnsutil clear-zone foo bar
Syntax: pdnsutil clear-zone ZONE

17 months agoAdd reminders for 53/tcp in the NOTRACK rules in docs 12705/head
Håkan Lindqvist [Wed, 29 Mar 2023 20:25:29 +0000 (22:25 +0200)] 
Add reminders for 53/tcp in the NOTRACK rules in docs

17 months agoMerge pull request #12704 from omoerbeek/rec-spellcheck-memlock
Peter van Dijk [Wed, 29 Mar 2023 21:04:09 +0000 (23:04 +0200)] 
Merge pull request #12704 from omoerbeek/rec-spellcheck-memlock

spellcheck: Fix entry for memlock

17 months agoFix entry for memlock 12704/head
Otto Moerbeek [Wed, 29 Mar 2023 14:20:37 +0000 (16:20 +0200)] 
Fix entry for memlock

16:20 < Habbie> uppercase requires uppercase, lowercase matches both?
16:20 < Habbie> and putting both in triggers a bug?
16:20 < timeless> Right
16:20 < timeless> More or less

17 months agoMerge pull request #12703 from omoerbeek/rec-prep-2023-02
Otto Moerbeek [Wed, 29 Mar 2023 11:11:36 +0000 (13:11 +0200)] 
Merge pull request #12703 from omoerbeek/rec-prep-2023-02

Prep for PowerDNS Security Advisory 2023-02

17 months agoMerge pull request #12699 from omoerbeek/rec-spoof
Otto Moerbeek [Wed, 29 Mar 2023 10:33:07 +0000 (12:33 +0200)] 
Merge pull request #12699 from omoerbeek/rec-spoof

rec: Deterred spoofing attempts can lead to authoritative servers being marked unavailable

17 months agoSpellcheck 12703/head
Otto Moerbeek [Wed, 29 Mar 2023 10:08:50 +0000 (12:08 +0200)] 
Spellcheck

17 months agoPrep for PowerDNS Security Advisory 2023-02
Otto Moerbeek [Tue, 28 Mar 2023 07:51:38 +0000 (09:51 +0200)] 
Prep for PowerDNS Security Advisory 2023-02

17 months agoStart using newly assigned "Synthesized" EDE
Otto Moerbeek [Wed, 29 Mar 2023 09:18:54 +0000 (11:18 +0200)] 
Start using newly assigned "Synthesized" EDE

17 months agoPowerDNS Security Advisory 2023-02: Deterred spoofing attempts can lead to authoritat... 12699/head
Otto Moerbeek [Wed, 29 Mar 2023 07:44:10 +0000 (09:44 +0200)] 
PowerDNS Security Advisory 2023-02: Deterred spoofing attempts can lead to authoritative servers being marked unavailable (CVE-2023-26437)

17 months agoMerge pull request #12697 from rgacogne/ddist-wait-longer-before-killing
Remi Gacogne [Wed, 29 Mar 2023 03:38:16 +0000 (05:38 +0200)] 
Merge pull request #12697 from rgacogne/ddist-wait-longer-before-killing

dnsdist: Wait a bit longer for the process to exit before killing it

17 months agoMerge pull request #12696 from omoerbeek/rec-negcache-test-race
Otto Moerbeek [Tue, 28 Mar 2023 15:48:08 +0000 (17:48 +0200)] 
Merge pull request #12696 from omoerbeek/rec-negcache-test-race

rec: fix a race in the negcache unit tests

17 months agodnsdist: Wait a bit longer for the process to exit before killing it 12697/head
Remi Gacogne [Tue, 28 Mar 2023 15:22:27 +0000 (17:22 +0200)] 
dnsdist: Wait a bit longer for the process to exit before killing it

This prevents a long list of
```
kill... <Popen: returncode: None args: ['../pdns/dnsdistdist/dnsdist', '--supervised...>
```
when running with TSAN-enabled.
In my tests it did not seem to really slow the build: roughly 3%
slower but that might even be in the error margin for these tests.

17 months agorec: fix a race in the negcache unit tests 12696/head
Otto Moerbeek [Tue, 28 Mar 2023 14:32:41 +0000 (16:32 +0200)] 
rec: fix a race in the negcache unit tests

17 months agoMerge pull request #12694 from omoerbeek/rec-reset-ede
Otto Moerbeek [Tue, 28 Mar 2023 14:16:32 +0000 (16:16 +0200)] 
Merge pull request #12694 from omoerbeek/rec-reset-ede

rec: reset EDE in context when starting to resolve

17 months agoMerge pull request #12695 from omoerbeek/rec-map-stack-fbsd
Otto Moerbeek [Tue, 28 Mar 2023 12:52:54 +0000 (14:52 +0200)] 
Merge pull request #12695 from omoerbeek/rec-map-stack-fbsd

rec: Unbreak FreeBSD mthread stack allocation

17 months agoTest that an intermediate EDE does not get reported with the final answer 12694/head
Otto Moerbeek [Tue, 28 Mar 2023 12:48:26 +0000 (14:48 +0200)] 
Test that an intermediate EDE does not get reported with the final answer

17 months agoUnbreak FreeBSD mthread stack allocation 12695/head
Otto Moerbeek [Tue, 28 Mar 2023 12:00:03 +0000 (14:00 +0200)] 
Unbreak FreeBSD mthread stack allocation

On FreeBSD, MAP_STACK has a completely different meaning compared to
OpenBSD. So only use MAP_STACK on OpenBSD.

17 months agoMerge pull request #12674 from rgacogne/less-shared-ptr dnsdist-1.9.0-alpha0
Remi Gacogne [Tue, 28 Mar 2023 11:20:16 +0000 (13:20 +0200)] 
Merge pull request #12674 from rgacogne/less-shared-ptr

validate: Stop passing shared pointers all the way down

17 months agoMerge pull request #12689 from rgacogne/ddist-grepq-tofile
Remi Gacogne [Tue, 28 Mar 2023 11:19:18 +0000 (13:19 +0200)] 
Merge pull request #12689 from rgacogne/ddist-grepq-tofile

dnsdist: Add an option to write `grepq`'s output to a file

17 months agoMerge pull request #12682 from rgacogne/ddist-ci-wait-for dnsdist-1.8.0
Remi Gacogne [Tue, 28 Mar 2023 10:39:46 +0000 (12:39 +0200)] 
Merge pull request #12682 from rgacogne/ddist-ci-wait-for

dnsdist: Wait until dnsdist is listening on the requested port in the tests

17 months agorec: reset EDE in context when starting to resolve
Otto Moerbeek [Tue, 28 Mar 2023 09:09:40 +0000 (11:09 +0200)] 
rec: reset EDE in context when starting to resolve

Fixes #12691

There is a slight complication here: If QM found an error, a retry
without QM is done, and that clears the EDE but might not find an
EDE itself (since it does not walk all labels).  So remember the
original EDE and put it back in place if the last effort attempt
failed but did not set an EDE.

17 months agodnsdist: Apply suggestions from code review, apply formatting 12689/head
Remi Gacogne [Tue, 28 Mar 2023 07:12:25 +0000 (09:12 +0200)] 
dnsdist: Apply suggestions from code review, apply formatting

17 months agoMerge pull request #12688 from omoerbeek/rec-bound-invariant
Otto Moerbeek [Mon, 27 Mar 2023 15:04:41 +0000 (17:04 +0200)] 
Merge pull request #12688 from omoerbeek/rec-bound-invariant

rec: re-establish "recursion depth is always increasing" invariant

17 months agodnsdist: Add an option to write `grepq`'s output to a file
Remi Gacogne [Mon, 27 Mar 2023 15:03:43 +0000 (17:03 +0200)] 
dnsdist: Add an option to write `grepq`'s output to a file

17 months agoALso derive alias recursion bound from s_maxdepth. 12688/head
Otto Moerbeek [Mon, 27 Mar 2023 10:22:16 +0000 (12:22 +0200)] 
ALso derive alias recursion bound from s_maxdepth.

This should be revisited, as it looks like the check
in doCNAMECacheCheck() overrides the less strick check in
doResolveNoQNameMinimization().

17 months agodnsdist: Don't test the web server port before the concurrent conns check 12682/head
Remi Gacogne [Mon, 27 Mar 2023 08:01:51 +0000 (10:01 +0200)] 
dnsdist: Don't test the web server port before the concurrent conns check

17 months agorec: re-establish "recursion depth is always increasing" invariant
Otto Moerbeek [Thu, 23 Mar 2023 10:42:35 +0000 (11:42 +0100)] 
rec: re-establish "recursion depth is always increasing" invariant

Now that we have getQMFallbackMode(), we can go back to always increase depth
and never decrease it and adapt the upper bound check if needed.

This should prevent a re-occurence of a bug similar to PowerDNS Security Advisory 2023-01.

17 months agoMerge pull request #12687 from rgacogne/ddist-rule-params
Remi Gacogne [Sat, 25 Mar 2023 14:54:09 +0000 (15:54 +0100)] 
Merge pull request #12687 from rgacogne/ddist-rule-params

dnsdist: Fix 'Unknown key' issue for actions and rules parameters

17 months agoMerge pull request #12684 from Habbie/amazon-linux-2023
Peter van Dijk [Fri, 24 Mar 2023 22:51:20 +0000 (23:51 +0100)] 
Merge pull request #12684 from Habbie/amazon-linux-2023

builder: add amazon-2023 target

17 months agodnsdist: Fix 'Unknown key' issue for actions and rules parameters 12687/head
Remi Gacogne [Fri, 24 Mar 2023 17:26:13 +0000 (18:26 +0100)] 
dnsdist: Fix 'Unknown key' issue for actions and rules parameters

The parameters were properly parsed but not marked as consumed,
leading to warnings such as:
```
addAction: Unknown key 'name' given - ignored
```

17 months agobuilder: add amazon-2023 target 12684/head
Peter van Dijk [Tue, 21 Mar 2023 14:32:06 +0000 (15:32 +0100)] 
builder: add amazon-2023 target

17 months agoMerge pull request #12668 from aerique/feature/add-auth-48-to-repo-script
Remi Gacogne [Fri, 24 Mar 2023 13:49:27 +0000 (14:49 +0100)] 
Merge pull request #12668 from aerique/feature/add-auth-48-to-repo-script

Add auth-48 to repo test script.

17 months agodnsdist: Remove a left-over startup delay in the regression tests
Remi Gacogne [Fri, 24 Mar 2023 09:47:27 +0000 (10:47 +0100)] 
dnsdist: Remove a left-over startup delay in the regression tests

17 months agodnsdist: Wait the correct port to come up on special case tests
Remi Gacogne [Fri, 24 Mar 2023 09:47:02 +0000 (10:47 +0100)] 
dnsdist: Wait the correct port to come up on special case tests

17 months agodnsdist: Wait for the API port to be available before running the tests
Remi Gacogne [Fri, 24 Mar 2023 09:45:08 +0000 (10:45 +0100)] 
dnsdist: Wait for the API port to be available before running the tests

18 months agovalidate: Stop passing shared pointers all the way down 12674/head
Remi Gacogne [Wed, 22 Mar 2023 16:55:42 +0000 (17:55 +0100)] 
validate: Stop passing shared pointers all the way down

18 months agoMerge pull request #12672 from omoerbeek/dnsheader-aligned
Otto Moerbeek [Wed, 22 Mar 2023 13:34:59 +0000 (14:34 +0100)] 
Merge pull request #12672 from omoerbeek/dnsheader-aligned

rec and dnsdist: fix a dnsheader unaligned case

18 months agoContinue processing records after OPT in ageDNSPacket() 12672/head
Otto Moerbeek [Wed, 22 Mar 2023 10:04:13 +0000 (11:04 +0100)] 
Continue processing records after OPT in ageDNSPacket()

18 months agoMerge pull request #12664 from rgacogne/auth-svcb-race-copy-const
Remi Gacogne [Wed, 22 Mar 2023 09:17:10 +0000 (10:17 +0100)] 
Merge pull request #12664 from rgacogne/auth-svcb-race-copy-const

DNSRecord: Ensure that the content can be read or replaced, not edited

18 months agoAnother case of too early API access
Otto Moerbeek [Tue, 21 Mar 2023 16:07:46 +0000 (17:07 +0100)] 
Another case of too early API access

18 months agorec and dnsdist: fix a case of potential unaligned header access
Otto Moerbeek [Tue, 21 Mar 2023 12:34:35 +0000 (13:34 +0100)] 
rec and dnsdist: fix a case of potential unaligned header access

I addded an argument to ageDNSPacket to circumvent having to do it in
two places in rec.

I am also wondering if the break in ageDNSPakcet() is right.
I suspect we want to continue with other records even if we see an OPT
(which does not *have* to be the last as far as I know)

18 months agoMerge pull request #12661 from Habbie/auth-4.8.0-alpha1-docs
Peter van Dijk [Tue, 21 Mar 2023 13:56:38 +0000 (14:56 +0100)] 
Merge pull request #12661 from Habbie/auth-4.8.0-alpha1-docs

auth-4.8.0-alpha1: secpoll&docs

18 months agoMerge pull request #12627 from Habbie/ubuntu-lunar
Peter van Dijk [Tue, 21 Mar 2023 12:34:03 +0000 (13:34 +0100)] 
Merge pull request #12627 from Habbie/ubuntu-lunar

add ubuntu:lunar builder target and test it daily

18 months agoauth-4.8.0-alpha1: secpoll&docs 12661/head
Peter van Dijk [Fri, 17 Mar 2023 13:09:01 +0000 (14:09 +0100)] 
auth-4.8.0-alpha1: secpoll&docs

18 months agoAdd auth-48 to repo test script. 12668/head
Erik Winkels [Tue, 21 Mar 2023 09:28:13 +0000 (10:28 +0100)] 
Add auth-48 to repo test script.

18 months agoMerge pull request #12667 from omoerbeek/rec-test-notify-wait-for-api
Otto Moerbeek [Tue, 21 Mar 2023 08:39:26 +0000 (09:39 +0100)] 
Merge pull request #12667 from omoerbeek/rec-test-notify-wait-for-api

rec: Wait for the API to come alive before using it in notify test

18 months agoMerge pull request #12654 from Habbie/dnsdist-secpoll-ctime
Remi Gacogne [Tue, 21 Mar 2023 08:25:08 +0000 (09:25 +0100)] 
Merge pull request #12654 from Habbie/dnsdist-secpoll-ctime

dnsdist secpoll: explicitly include necessary ctime header for time_t

18 months agorec: Wait for the API to come alive before using it in notify test 12667/head
Otto Moerbeek [Mon, 20 Mar 2023 11:36:20 +0000 (12:36 +0100)] 
rec: Wait for the API to come alive before using it in notify test

18 months agoMerge pull request #12666 from Habbie/lmdb-bit-header auth-4.8.0-alpha1
Peter van Dijk [Mon, 20 Mar 2023 10:03:26 +0000 (11:03 +0100)] 
Merge pull request #12666 from Habbie/lmdb-bit-header

lmdb-safe: remove unused header, plus assert macro presence

18 months agolmdb-safe: remove unused header, plus assert macro presence 12666/head
Peter van Dijk [Mon, 20 Mar 2023 09:03:25 +0000 (10:03 +0100)] 
lmdb-safe: remove unused header, plus assert macro presence

18 months agoDNSRecord: Ensure that the content can be read or replaced, not edited 12664/head
Remi Gacogne [Thu, 16 Mar 2023 21:55:56 +0000 (22:55 +0100)] 
DNSRecord: Ensure that the content can be read or replaced, not edited

18 months agoMerge pull request #12546 from Habbie/auth-lmdb-schema-5
Peter van Dijk [Fri, 17 Mar 2023 15:29:17 +0000 (16:29 +0100)] 
Merge pull request #12546 from Habbie/auth-lmdb-schema-5

auth: LMDB schema version 5

18 months ago auth: Prevent a race during the processing of SVC auto-hints
Remi Gacogne [Thu, 16 Mar 2023 13:18:49 +0000 (14:18 +0100)] 
 auth: Prevent a race during the processing of SVC auto-hints

When `svc-autohints` is enabled, the content of SVCB and HTTPS records
is modified in `PacketHandler::doAdditionalProcessing()` to expand
the IPv4 and IPv6 with their actual values.
This causes an issue because the content of these records might be
shared between threads, via the record cache, and one thread could
be trying to read from the internal `std::set` while a second thread
is altering it, leading to a data race and possibly to memory corruption
and a crash.
This is correctly detected by TSAN:
```
WARNING: ThreadSanitizer: data race (pid=102795)
  Write of size 8 at 0x7b3400010350 by thread T33:
    #0 operator delete(void*) <null> (pdns_server+0x211b7c) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #1 std::__new_allocator<std::_Rb_tree_node<SvcParam>>::deallocate(std::_Rb_tree_node<SvcParam>*, unsigned long) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/new_allocator.h:158:2 (pdns_server+0x33fc78) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #2 std::allocator_traits<std::allocator<std::_Rb_tree_node<SvcParam>>>::deallocate(std::allocator<std::_Rb_tree_node<SvcParam>>&, std::_Rb_tree_node<SvcParam>*, unsigned long) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/alloc_traits.h:496:13 (pdns_server+0x33fc78)
    #3 std::_Rb_tree<SvcParam, SvcParam, std::_Identity<SvcParam>, std::less<SvcParam>, std::allocator<SvcParam>>::_M_put_node(std::_Rb_tree_node<SvcParam>*) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_tree.h:565:9 (pdns_server+0x33fc78)
    #4 std::_Rb_tree<SvcParam, SvcParam, std::_Identity<SvcParam>, std::less<SvcParam>, std::allocator<SvcParam>>::_M_drop_node(std::_Rb_tree_node<SvcParam>*) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_tree.h:632:2 (pdns_server+0x33fc78)
    #5 std::_Rb_tree<SvcParam, SvcParam, std::_Identity<SvcParam>, std::less<SvcParam>, std::allocator<SvcParam>>::_M_erase_aux(std::_Rb_tree_const_iterator<SvcParam>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_tree.h:2495:7 (pdns_server+0x33fc78)
    #6 std::_Rb_tree<SvcParam, SvcParam, std::_Identity<SvcParam>, std::less<SvcParam>, std::allocator<SvcParam>>::erase[abi:cxx11](std::_Rb_tree_const_iterator<SvcParam>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_tree.h:1197:2 (pdns_server+0x33fc78)
    #7 std::set<SvcParam, std::less<SvcParam>, std::allocator<SvcParam>>::erase[abi:cxx11](std::_Rb_tree_const_iterator<SvcParam>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_set.h:655:21 (pdns_server+0x33fc78)
    #8 SVCBBaseRecordContent::setHints(SvcParam::SvcParamKey const&, std::vector<ComboAddress, std::allocator<ComboAddress>> const&) /work/pdns/pdns/dnsrecords.cc:768:14 (pdns_server+0x33fc78)
    #9 PacketHandler::doAdditionalProcessing(DNSPacket&, std::unique_ptr<DNSPacket, std::default_delete<DNSPacket>>&) /work/pdns/pdns/packethandler.cc:565:16 (pdns_server+0x4ed330) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #10 PacketHandler::doQuestion(DNSPacket&) /work/pdns/pdns/packethandler.cc:1794:5 (pdns_server+0x4f79b4) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#11 PacketHandler::question(DNSPacket&) /work/pdns/pdns/packethandler.cc:1175:10 (pdns_server+0x4f649a) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#12 MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::distribute(int) /work/pdns/pdns/./distributor.hh:220:14 (pdns_server+0x260f70) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#13 MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()::operator()() const /work/pdns/pdns/./distributor.hh:179:25 (pdns_server+0x260b31) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#14 void std::__invoke_impl<void, MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>(std::__invoke_other, MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:61:14 (pdns_server+0x260b31)
    PowerDNS#15 std::__invoke_result<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>::type std::__invoke<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>(MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:96:14 (pdns_server+0x260b31)
    PowerDNS#16 void std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:258:13 (pdns_server+0x260b31)
    PowerDNS#17 std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>::operator()() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:265:11 (pdns_server+0x260b31)
    PowerDNS#18 std:thread:_State_impl<std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>>::_M_run() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:210:13 (pdns_server+0x260b31)
    PowerDNS#19 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:82:18 (libstdc++.so.6+0xd72c2) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)

  Previous read of size 2 at 0x7b3400010350 by thread T39:
    #0 SvcParam::getKey() const /work/pdns/pdns/./svc-records.hh:80:12 (pdns_server+0x3721f3) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #1 GenericDNSPacketWriter<std::vector<unsigned char, std::allocator<unsigned char>>>::xfrSvcParamKeyVals(std::set<SvcParam, std::less<SvcParam>, std::allocator<SvcParam>> const&) /work/pdns/pdns/dnswriter.cc:404:23 (pdns_server+0x3721f3)
    #2 void HTTPSRecordContent::xfrPacket<GenericDNSPacketWriter<std::vector<unsigned char, std::allocator<unsigned char>>>>(GenericDNSPacketWriter<std::vector<unsigned char, std::allocator<unsigned char>>>&, bool) /work/pdns/pdns/dnsrecords.cc:348:1 (pdns_server+0x3349bd) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #3 HTTPSRecordContent::toPacket(GenericDNSPacketWriter<std::vector<unsigned char, std::allocator<unsigned char>>>&) /work/pdns/pdns/dnsrecords.cc:348:1 (pdns_server+0x3349bd)
    #4 DNSRecordContent::serialize[abi:cxx11](DNSName const&, bool, bool) /work/pdns/pdns/./dnsparser.hh:215:11 (pdns_server+0x311140) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #5 DNSPacket::addRecord(DNSZoneRecord&&) /work/pdns/pdns/dnspacket.cc:177:68 (pdns_server+0x2fa894) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #6 PacketHandler::doAdditionalProcessing(DNSPacket&, std::unique_ptr<DNSPacket, std::default_delete<DNSPacket>>&) /work/pdns/pdns/packethandler.cc:542:8 (pdns_server+0x4eccf2) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #7 PacketHandler::doQuestion(DNSPacket&) /work/pdns/pdns/packethandler.cc:1794:5 (pdns_server+0x4f79b4) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #8 PacketHandler::question(DNSPacket&) /work/pdns/pdns/packethandler.cc:1175:10 (pdns_server+0x4f649a) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #9 MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::distribute(int) /work/pdns/pdns/./distributor.hh:220:14 (pdns_server+0x260f70) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #10 MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()::operator()() const /work/pdns/pdns/./distributor.hh:179:25 (pdns_server+0x260b31) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#11 void std::__invoke_impl<void, MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>(std::__invoke_other, MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:61:14 (pdns_server+0x260b31)
    PowerDNS#12 std::__invoke_result<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>::type std::__invoke<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>(MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:96:14 (pdns_server+0x260b31)
    PowerDNS#13 void std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:258:13 (pdns_server+0x260b31)
    PowerDNS#14 std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>::operator()() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:265:11 (pdns_server+0x260b31)
    PowerDNS#15 std:thread:_State_impl<std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>>::_M_run() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:210:13 (pdns_server+0x260b31)
    PowerDNS#16 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:82:18 (libstdc++.so.6+0xd72c2) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)

  Thread T33 'pdns/distributo' (tid=102833, running) created by thread T17 at:
    #0 pthread_create <null> (pdns_server+0x1904e6) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #1 __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663:35 (libstdc++.so.6+0xd73a9) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)
    #2 std:thread:_M_start_thread(std::unique_ptr<std:thread:_State, std::default_delete<std:thread:_State>>, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:147:37 (libstdc++.so.6+0xd73a9)
    #3 Distributor<DNSPacket, DNSPacket, PacketHandler>::Create(int) /work/pdns/pdns/./distributor.hh:134:18 (pdns_server+0x256d23) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #4 qthread(unsigned int) /work/pdns/pdns/auth-main.cc:536:25 (pdns_server+0x256d23)
    #5 void std::__invoke_impl<void, void (*)(unsigned int), unsigned int>(std::__invoke_other, void (*&&)(unsigned int), unsigned int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:61:14 (pdns_server+0x2635f0) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #6 std::__invoke_result<void (*)(unsigned int), unsigned int>::type std::__invoke<void (*)(unsigned int), unsigned int>(void (*&&)(unsigned int), unsigned int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:96:14 (pdns_server+0x2635f0)
    #7 void std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:258:13 (pdns_server+0x2635f0)
    #8 std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>::operator()() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:265:11 (pdns_server+0x2635f0)
    #9 std:thread:_State_impl<std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>>::_M_run() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:210:13 (pdns_server+0x2635f0)
    #10 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:82:18 (libstdc++.so.6+0xd72c2) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)

  Thread T39 'pdns/distributo' (tid=102837, running) created by thread T19 at:
    #0 pthread_create <null> (pdns_server+0x1904e6) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #1 __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663:35 (libstdc++.so.6+0xd73a9) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)
    #2 std:thread:_M_start_thread(std::unique_ptr<std:thread:_State, std::default_delete<std:thread:_State>>, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:147:37 (libstdc++.so.6+0xd73a9)
    #3 Distributor<DNSPacket, DNSPacket, PacketHandler>::Create(int) /work/pdns/pdns/./distributor.hh:134:18 (pdns_server+0x256d23) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #4 qthread(unsigned int) /work/pdns/pdns/auth-main.cc:536:25 (pdns_server+0x256d23)
    #5 void std::__invoke_impl<void, void (*)(unsigned int), unsigned int>(std::__invoke_other, void (*&&)(unsigned int), unsigned int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:61:14 (pdns_server+0x2635f0) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #6 std::__invoke_result<void (*)(unsigned int), unsigned int>::type std::__invoke<void (*)(unsigned int), unsigned int>(void (*&&)(unsigned int), unsigned int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:96:14 (pdns_server+0x2635f0)
    #7 void std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:258:13 (pdns_server+0x2635f0)
    #8 std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>::operator()() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:265:11 (pdns_server+0x2635f0)
    #9 std:thread:_State_impl<std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>>::_M_run() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:210:13 (pdns_server+0x2635f0)
    #10 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:82:18 (libstdc++.so.6+0xd72c2) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)

SUMMARY: ThreadSanitizer: data race (/work/pdns-rgacogne/pdns/pdns_server+0x211b7c) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593) in operator delete(void*)
```

To prevent this issue, this commit clones the content of SVCB/HTTPS
records before modifying the copy. the drawback is that we need to
do this operation every single time we process them.

18 months agoformat 12546/head
Peter van Dijk [Fri, 17 Mar 2023 13:51:45 +0000 (14:51 +0100)] 
format

18 months agocleanup
Peter van Dijk [Fri, 17 Mar 2023 13:51:21 +0000 (14:51 +0100)] 
cleanup

18 months agostring_view
Peter van Dijk [Fri, 17 Mar 2023 13:46:38 +0000 (14:46 +0100)] 
string_view