CHANGELOG.md 7.5 KB

Changelog

All notable changes to this project are documented here.

[0.3.0] - 2026-10-23

Fixes the findings of the external security audit of 2026-10-23 (commit 0fb485d): P1 (recursive include) and all P2 items, plus the P3 items.

Fixed (P1)

  • Recursive config include in the compose template. ./config (containing the base unbound.conf) was mounted to /config, which the base config includes via /config/*.conf — the base config included itself. Drop-ins now live in a separate ./conf.d/ directory mounted to /config; the base config stays baked in at /etc/unbound/. New regression test: the test suite starts the container with the ACTUAL docker-compose.yml (old fixture-based tests couldn't see this bug).

Fixed (P2)

  • RFC5011 anchor state lost on every restart. cp -f reset the root trust anchor to the package state on every start (and it lived on tmpfs in the template). The anchor now lives in a persistent, writable /var/unbound (named volume in the compose template) and is initialized from the dnssec-root package only if no state file exists yet. Learned keys and rollover state survive restarts. New test: anchor content + mtime unchanged across a container restart, AD=1 before and after.
  • Compose template published DNS on all host addresses. ports removed; the template is for a shared internal network (e.g. Pi-hole). LAN access is an explicit opt-in via a comment example publishing on a specific host address.
  • DoT examples without a certificate identity. forward-addr examples now pin the TLS name: 1.1.1.1@853#cloudflare-dns.com (without it, any CA-signed certificate on the path would be accepted).
  • Tests did not prove DNSSEC validation. The AD-bit probe now builds a correct EDNS-0 query (DO bit in the OPT record's EXTFLAGS field, arcount=1); the old probe's 0x0020 was the header AD bit, not DO. Deterministic checks: signed zone + DO -> NOERROR + answers + AD=1; same zone without DO -> AD=0; repeat for stability. The "unsigned zone -> AD=0" check is implemented via the no-DO variant because no stable unsigned public zone is guaranteed (zones get signed over time; dnssec-failed.org timed out during verification).

Added (P3 + audit "weitere Bewertung")

  • private-address extended: 127.0.0.0/8, ::1/128, fc00::/7, fe80::/10 (DNS-rebinding; the old list covered only RFC1918 + link-local IPv4).
  • Resource limits in the compose template: 1 CPU, 512 MB, 100 PIDs (abusive recursive lookups are bounded).
  • GPG release key fingerprint 2310…DF45 pinned in the Dockerfile (ARG GNUPG_FINGERPRINT): the imported key must carry it, otherwise the build fails — the signature now anchors to an independently verified identity, not just to the downloaded key.
  • README: reproducibility claim corrected (APK packages come from the mutable Alpine repository — sources + base images are pinned, the package set is not); cosign verify example fixed (certificate identity = workflow URL, issuer = token endpoint — separate fields).

Verified

  • Full test suite: 27 -> 31 assertions (new: anchor persistence, compose-template start).

[0.2.0] - 2026-10-23

Added (adopted from comparison with mvance/klutchell/madnuttah unbound images)

  • Supply chain: source tarballs (unbound + ldns) verified by SHA256 (pinned in Dockerfile) and GPG signature (NLnet Labs releases key G2) before extraction.
  • Base images pinned by digest (alpine:3.24, tonistiigi/xx:1.9.0) → reproducible builds.
  • Binary hardening: --enable-pie --enable-relro-now.
  • --enable-subnet (EDNS Client Subnet, inactive by default — opt in via config) and --enable-tfo-server --enable-tfo-client (TCP Fast Open).
  • Test suite extended: 19 → 27 assertions (GPG/SHA256 build-log evidence with per-run cache-bust, PIE via ELF e_type of the final binary, compiled feature flags via unbound -V configure line).
  • README: comparison table of the relevant unbound images on Docker Hub, adopted vs. deliberately skipped improvements (DNSCrypt/libsodium, DoH/ nghttp2, DNSTAP/protobuf-c, distroless final stage).

Verified

  • A/B drop-in test (test/ab-dropin.sh): v0.1.0 vs. v0.2.0 side by side with identical config — 7/7: identical resolution, identical DNSSEC AD-bit behavior, identical CHAOS/hide-identity behavior, identical contract (uid 1500, port 5053, healthcheck, /config volume). v0.2.0 is a pure drop-in for v0.1.0: only Dockerfile (build-time integrity, hardening, feature flags) and tests/docs changed; config/, entrypoint.sh, docker-compose.yml are untouched.

Docs

  • README: "References (inspiration, not code)" section — provenance of the adopted ideas (crazymax, mvance, klutchell, madnuttah) with licenses (MIT/MIT/BSD-3/MIT); no verbatim code copied, attribution not legally required, listed for transparency.

Fixed

  • Plain docker build (without --build-arg CACHEBUST) failed with /bin/sh: CACHEBUST: parameter not set because ARG CACHEBUST had no default and the src stages run with set -u. Now ARG CACHEBUST="" — plain builds work, the test suite keeps passing a timestamp to force fresh integrity verification.
  • Source downloads in both src stages now use curl --retry 3 --retry-delay 2 --retry-all-errors --max-time …: build-host DNS can be flaky (observed 2026-10-23: WSL/Windows resolver intermittently failing on nlnetlabs.nl while public resolvers answered in ~30 ms), which aborted builds with curl: (6) Could not resolve host.

[0.1.0] - 2026-10-23

Added

  • Initial project: security-hardened Unbound Docker image as drop-in replacement for crazymax/unbound.
  • Unbound 1.26.2 from source (security release 2026-10-21) on Alpine 3.24, multi-stage xx cross-compile build, multi-arch capable.
  • ldns 1.9.2 with drill for the healthcheck.
  • Non-root user (uid/gid 1500), zero effective capabilities.
  • Base config with DNSSEC root anchor, DoT cert bundle, cachedb module, /config/*.conf drop-in include, hide-identity/hide-version.
  • Hardened docker compose template: read-only root fs, tmpfs, no-new-privileges, cap_drop ALL.
  • Test suite (runs fully inside Docker): build, healthcheck, version, DNS, DNSSEC AD-bit, uid, CapEff, SUID scan, read-only fs, NoNewPrivs, seccomp, hide-identity, drop-in include accept/reject, attack surface.
  • build.sh with cosign keyless signing.

Security fixes (vs. crazymax/unbound:latest audit, 2026-10-22/23)

  • CVE-2026-96405 (Medium, DoS): fixed by Unbound 1.26.2
  • CVE-2026-109125 (Medium, cache poisoning side channel): fixed by 1.26.2
  • CVE-2026-50106 (Medium, DNSSEC island bypass): fixed by 1.26.2
  • CVE-2026-35501 (Low, NSEC island bypass): fixed by 1.26.2
  • CVE-2026-97206 (High, DoQ UAF): fixed by 1.26.2; not reachable in this image anyway (QUIC not compiled)
  • CVE-2026-77214 / CVE-2026-93990 / CVE-2026-102633 (expat): fixed by Alpine 3.24 expat 2.9.0
  • CVE-2026-58055 (nghttp2) + CVE-2026-85091 (zlib): library stack removed (dns-root-hints dropped; Unbound has root servers built in)
  • SUID-root binaries removed (shadow package dropped from runtime)

Verified

  • Trivy 0.76.1 scan of the built image: 0 CVEs (CRITICAL/HIGH/MEDIUM/LOW), vs. 4 HIGH + 4 MEDIUM for crazymax/unbound:latest
  • Full test suite: 19/19 passed (build, healthcheck, version 1.26.2, DNS, DNSSEC AD-bit, uid 1500, CapEff=0, no SUID, read-only root fs, tmpfs run-dir, NoNewPrivs, seccomp, hide-identity + control, drop-in include accept/reject, no curl, no shadow)
  • Image size: 70.4 MB vs. 93.8 MB (crazymax/unbound)