Skip to content

Security

MateusBMP edited this page Nov 16, 2026 · 3 revisions

Security

Reporting a vulnerability

Do not open a public issue. Report it privately with GitHub's Report a vulnerability form (the repository's Security tab). Only the maintainers see it. The full policy, including what is in scope and what to expect, is in SECURITY.md.

Only the latest commit on main is supported while the project is pre-alpha.

Threat model in short

Who What they must not be able to do
A local user (including the desktop user) Weaken protection without the admin password, read other users' queries, make the root helper touch files, take over the DNS port
A container or VM on a bridge Reach the resolver except through the opt-in redirect; affect the host's protection
A host on the LAN Use port 153 or 154 as an open resolver
A filter list publisher or DNS upstream Crash the daemon, escape the sandbox, or do more than control the answers they are trusted for
A failure (crash, hang, flushed rules, uninstall) Leave DNS broken or rules behind: protection fails open, and nothing is persisted

Defences

  • Unprivileged, sandboxed daemon. blockadsd and blockads-update run as the system user blockads with no capabilities, under a strict systemd sandbox (ProtectSystem=strict, PrivateUsers, ProcSubset=pid, SocketBindDeny=any, a system-call filter, MemoryDenyWriteExecute, ...; systemd-analyze security exposure about 1.2–1.4). The updater cannot read the query log.
  • Sockets held by PID 1. systemd binds the privileged port 153 and hands it over, so the daemon never binds sockets and no local user can grab the port after a crash.
  • Minimal root helper. blockads-fw is one stdlib-only Python file, run only from systemd hooks or pkexec. It resolves and checks every binary path (root-owned, not group/world-writable), reads firewall.conf with O_NOFOLLOW and a strict schema, has no flags or environment variables that change paths, runs no shell and uses no network.
  • polkit on every D-Bus call. See Architecture#d-bus-api-and-permissions. Interactive authentication only when the client allows it; sizes and in-flight calls are limited before polkit is asked.
  • Verified, fail-open firewall changes. Own chains only, a live probe after every apply, revert on every stop and failure (with a POSIX sh fallback copied to /run), never persisted.
  • No open resolver. The bridge listener accepts only redirected (ctstate DNAT) packets, and the daemon answers only sources in the subnets of the configured bridge interfaces.
  • Privacy. No telemetry; lists come from their original publishers and are compiled locally; no per-query D-Bus signals (the system bus broadcasts them); query names are escaped in the GUI and notifications; CSV export guards against formula injection; core dumps are disabled. A unit test checks that every catalog list URL is an original HTTPS publisher URL (never the upstream project's compile servers), and the GUI tests also run in a network namespace without network (tests/netns/gui_offline.sh).

Known limitations

These are documented and shown in the GUI, not vulnerabilities:

  • systemd-resolved with DNSOverTLS=yes bypasses the filter (status "partial").
  • Containers on bridges can use DNS over TLS; only their port-53 traffic is redirected.
  • Applications using DNS-over-HTTPS servers not on the optional DoH blocklist, or hardcoded IPs, are not filtered.
  • Root, or anyone with the admin password, can turn protection off.

Clone this wiki locally