[packages/pdns-recursor] Up to 5.4.9
arekm
arekm at pld-linux.org
Thu Oct 29 08:56:02 CET 2026
commit 32838b5bea5cde01481582fa9d993db18ec234ce
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Oct 29 00:41:28 2026 +0100
Up to 5.4.9
Fixes CVE-2026-85559, CVE-2026-85558, CVE-2026-85557, CVE-2026-85556,
CVE-2026-85555, CVE-2026-73206, CVE-2026-73205, CVE-2026-52690,
CVE-2026-52688, CVE-2026-52686, CVE-2026-52684, CVE-2026-52682,
CVE-2026-42390, CVE-2026-42389, CVE-2026-42388, CVE-2026-42387,
CVE-2026-42005, CVE-2026-40012, CVE-2026-33612, CVE-2026-33601,
CVE-2026-33600, CVE-2026-33262, CVE-2026-33261, CVE-2026-33260,
CVE-2026-33259, CVE-2026-33258, CVE-2026-33257, CVE-2026-33256,
CVE-2026-24027, CVE-2026-0398, CVE-2025-59030, CVE-2025-59029,
CVE-2025-59024, CVE-2025-59023, CVE-2025-30195, CVE-2025-30192.
pdns-recursor-CVE-2026-52684.patch | 55 ++++++++++++++++++++++++++++++++++++++
pdns-recursor-nodcachedir.patch | 14 ++++++++++
pdns-recursor.spec | 50 +++++++++++++++++++++++++++++-----
3 files changed, 113 insertions(+), 6 deletions(-)
---
diff --git a/pdns-recursor.spec b/pdns-recursor.spec
index d4445f3..b0ff928 100644
--- a/pdns-recursor.spec
+++ b/pdns-recursor.spec
@@ -8,13 +8,21 @@
Summary: Modern, advanced and high performance recursing/non authoritative nameserver
Summary(pl.UTF-8): Nowoczesny i zaawansowany buforujący serwer DNS o wysokiej wydajności
Name: pdns-recursor
-Version: 5.1.2
+Version: 5.4.9
Release: 1
License: GPL v2
Group: Networking/Daemons
-Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: 26d26a034649a2ea04c67fcde8782598
+Source0: https://downloads.powerdns.com/releases/%{name}-%{version}.tar.xz
+# Source0-md5: c5e797f095459cb90d37c12a8acd3dc6
Source1: %{name}.init
+# cd rec-rust-lib/rust
+# cargo vendor-filterer --platform='*-unknown-linux-*' --tier=2
+# cd ../..
+# tar cJf %%{name}-crates-%%{version}.tar.xz rec-rust-lib/rust/vendor
+Source2: %{name}-crates-%{version}.tar.xz
+# Source2-md5: 975757920a5dc3124e352260898ba67b
+Patch0: %{name}-nodcachedir.patch
+Patch1: %{name}-CVE-2026-52684.patch
URL: http://www.powerdns.com/
BuildRequires: boost-devel >= 1.54.0
BuildRequires: cargo >= 1.64
@@ -24,9 +32,13 @@ BuildRequires: libcap-devel
BuildRequires: libsodium-devel
BuildRequires: luajit-devel >= 2.0.2
BuildRequires: openssl-devel
-BuildRequires: protobuf-devel
BuildRequires: python3 >= 3.6
+BuildRequires: rpmbuild(macros) >= 2.050
+BuildRequires: rust
BuildRequires: systemd-devel
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+%{?rust_req}
Requires(post): sed >= 4.0
Requires(post,preun): /sbin/chkconfig
Requires(post,preun,postun): systemd-units
@@ -41,6 +53,7 @@ Requires: systemd-units
Provides: group(djbdns)
Provides: nameserver
Provides: user(pdns-recursor)
+ExclusiveArch: %{rust_arches}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -51,10 +64,28 @@ DNS server.
PowerDNS Recursor jest wysokowydajnym buforującym serwerem DNS.
%prep
-%setup -q
-%{__sed} -i -e 's/localstatedir/nodcachedir/g' settings/rust/Makefile.am
+%setup -q -a2
+%patch -P0 -p1
+%patch -P1 -p3
+
+# use our offline registry
+export CARGO_HOME="$(pwd)/.cargo"
+
+mkdir -p "$CARGO_HOME"
+cat >.cargo/config.toml <<EOF
+[net]
+offline = true
+
+[source.crates-io]
+replace-with = 'vendored-sources'
+
+[source.vendored-sources]
+directory = '$PWD/rec-rust-lib/rust/vendor'
+EOF
%build
+export CARGO_HOME="$(pwd)/.cargo"
+export RUSTFLAGS="%{rpmrustflags}"
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
@@ -62,12 +93,19 @@ PowerDNS Recursor jest wysokowydajnym buforującym serwerem DNS.
%{__automake}
%configure \
--sysconfdir=%{_sysconfdir}/%{name} \
+ --enable-dnstap \
+ --enable-nod \
+ --enable-systemd \
+ --with-libcap \
+ --with-libsodium \
--with-service-group=djbdns
%{__make} V=1
%install
rm -rf $RPM_BUILD_ROOT
+export CARGO_HOME="$(pwd)/.cargo"
+export RUSTFLAGS="%{rpmrustflags}"
%{__make} install \
SYSTEMD_DIR=%{systemdunitdir} \
diff --git a/pdns-recursor-CVE-2026-52684.patch b/pdns-recursor-CVE-2026-52684.patch
new file mode 100644
index 0000000..18e2796
--- /dev/null
+++ b/pdns-recursor-CVE-2026-52684.patch
@@ -0,0 +1,55 @@
+CVE-2026-52684: NS refresh of almost-expired records bypasses TTL capping
+https://github.com/PowerDNS/pdns/pull/17748 (master only, not in 5.4.x)
+
+From 63f480d2072d85ff5cd6eeb324bd52bf5debd4f7 Mon Sep 17 00:00:00 2001
+From: Otto Moerbeek <otto.moerbeek at open-xchange.com>
+Date: Mon, 20 Jul 2026 13:27:22 +0200
+Subject: [PATCH] rec: do not attempt to refresh NS records in
+ refresh-almost-expired.
+
+If the auth responds *very* slowly and the records expire in between,
+the capping of TTLs is not enforced for lack of data.
+
+This does not happen on regular resolve as then then the child
+records are used immediately if not expired and thus valid, or the
+records *are* expired, and in that case not used. So this case can
+only happen if almost expired records are used to refresh the
+authoritative NS records.
+
+Signed-off-by: Otto Moerbeek <otto.moerbeek at open-xchange.com>
+---
+ pdns/recursordist/recpacketcache.cc | 4 +++-
+ pdns/recursordist/recursor_cache.cc | 5 ++++-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/pdns/recursordist/recpacketcache.cc b/pdns/recursordist/recpacketcache.cc
+index 35ac400702e2..1935681ccc59 100644
+--- a/pdns/recursordist/recpacketcache.cc
++++ b/pdns/recursordist/recpacketcache.cc
+@@ -146,7 +146,9 @@ bool RecursorPacketCache::checkResponseMatches(MapCombo::LockedContent& shard, s
+ *age = static_cast<uint32_t>(now - iter->d_creation);
+ // we know ttl is > 0
+ auto ttl = static_cast<uint32_t>(iter->d_ttd - now);
+- if (s_refresh_ttlperc > 0 && !iter->d_submitted && taskQTypeIsSupported(qtype)) {
++ // Be wary of refreshing NS records, it could lead to ghosts if the record cache entry expires between
++ // sending out the request and the reply coming back in, as then the TTL capping does not work.
++ if (s_refresh_ttlperc > 0 && !iter->d_submitted && taskQTypeIsSupported(qtype) && qtype != QType::NS) {
+ const dnsheader_aligned header(iter->d_packet.data());
+ const auto* headerPtr = header.get();
+ if (headerPtr->rcode == RCode::NoError) {
+diff --git a/pdns/recursordist/recursor_cache.cc b/pdns/recursordist/recursor_cache.cc
+index b521b26c4e3b..1b0f0c9b66e7 100644
+--- a/pdns/recursordist/recursor_cache.cc
++++ b/pdns/recursordist/recursor_cache.cc
+@@ -425,7 +425,10 @@ time_t MemRecursorCache::fakeTTD(MemRecursorCache::OrderedTagIterator_t& entry,
+ if (refresh) {
+ return -1;
+ }
+- if (!entry->d_submitted) {
++ // We do not want to refresh auth NS entries, as it could lead to ghost domains if an entry
++ // expires between submit and response coming in, as the TTL capping then does not work for
++ // lack of current TTL info.
++ if (!entry->d_submitted && (qtype != QType::NS || !entry->d_auth)) {
+ pushRefreshTask(qname, qtype, entry->d_ttd, entry->d_netmask);
+ entry->d_submitted = true;
+ }
diff --git a/pdns-recursor-nodcachedir.patch b/pdns-recursor-nodcachedir.patch
new file mode 100644
index 0000000..40fe03a
--- /dev/null
+++ b/pdns-recursor-nodcachedir.patch
@@ -0,0 +1,14 @@
+Rust settings defaults put the NOD/UDR dirs under $(localstatedir) while the
+C++ side uses $(nodcachedir) (--with-nodcachedir); make both use nodcachedir.
+
+--- pdns-recursor-5.4.9.orig/rec-rust-lib/rust/Makefile.am
++++ pdns-recursor-5.4.9/rec-rust-lib/rust/Makefile.am
+@@ -21,7 +21,7 @@
+ src/lib.rs \
+ src/misc.rs \
+ src/web.rs
+- SYSCONFDIR=$(sysconfdir) NODCACHEDIRNOD=$(localstatedir)/nod NODCACHEDIRUDR=$(localstatedir)/udr $(CARGO) build --release $(RUST_TARGET) --target-dir=$(builddir)/target --manifest-path ${srcdir}/Cargo.toml
++ SYSCONFDIR=$(sysconfdir) NODCACHEDIRNOD=$(nodcachedir)/nod NODCACHEDIRUDR=$(nodcachedir)/udr $(CARGO) build --release $(RUST_TARGET) --target-dir=$(builddir)/target --manifest-path ${srcdir}/Cargo.toml
+ cp -pv target/$(RUSTC_TARGET_ARCH)/release/librecrust.a librecrust.a
+ cp -pv target/$(RUSTC_TARGET_ARCH)/cxxbridge/recrust/src/lib.rs.h lib.rs.h
+ cp -pv target/$(RUSTC_TARGET_ARCH)/cxxbridge/recrust/src/web.rs.h web.rs.h
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pdns-recursor.git/commitdiff/32838b5bea5cde01481582fa9d993db18ec234ce
More information about the pld-cvs-commit
mailing list