Security
This release fixes the following security advisories (credit to the reporters named):
High
- GHSA-pj9m-9623-2g75 (CVSS 7.2): a quote in
files.gravityorfiles.databaseended the SQL string in the TeleporterATTACHstatements, and together with Core'sgravity.shled to command execution by an admin. The path is now bound to a prepared statement. Reported by @Pedromdsn. Requires Core v6.6.
Low
- GHSA-x6xh-vxcm-g8rm (CVSS 3.8): app sessions without
webserver.api.app_sudoand CLI sessions could list every API session and end any of them. Reported by @gudangkantong. - GHSA-87wp-wm3p-8cxm (CVSS 3.7): IPv4 entries in
webserver.aclnever matched IPv4 clients on a dual-stackwebserver.portsuch as+80. Reported by @010011110. - GHSA-cg4p-5r3r-m54p (CVSS 3.1): a password change through
pihole-FTL --config(and sopihole setpassword) could be undone by an API config write at the same time, keeping the old password and its sessions valid. Reported by @010011110. - GHSA-fj2f-pgf2-j888 (CVSS 2.2): queries recorded at
misc.privacylevel3 could reach the long-term database once the level was lowered. Reported by @010011110. - GHSA-9mh9-95wj-4w4q (CVSS 2.2): crash when the metrics were read while a hosts file reload freed the dnsmasq cache. Needs a valid session. Reported by @010011110.
- GHSA-9hh4-j8jf-6c96 (CVSS 2.2): use-after-free when a v5 Teleporter import ran while the API read the config. Needs a valid session. Reported by @010011110.
What's Changed
This release backports the fixes that landed on development since v6.8 and updates the embedded dnsmasq (v2.93+42), SQLite (v3.54.1) and the bundled TRE regex engine (current upstream master), again without the v7 work. The TRE update changes how some stored regex filters match, so this is a minor release rather than v6.8.1.
The dnsmasq update carries one change that is not upstream yet, the blockdata_alloc() fix from #3305, which is pending on dnsmasq-discuss.
Improvements
- Regex matching is faster (#3315).
gravity.dbis only opened again when it changed on disk. This was most of FTL's CPU time while idle (#3323).- Partial domain searches also find ABP-style list entries.
- With DNSSEC, dnsmasq keeps extra TCP slots for its own validation queries, so validation still works when clients use up the TCP connection limit.
- Control characters in logged configuration values are escaped (#3325).
- Bash completion for
pihole-FTL --config -tand-q(#3339). .diskusedworks inpihole-FTL sqlite3.- Quad9's unfiltered upstream is labelled as validating DNSSEC.
Notable fixes
- DNSSEC, via dnsmasq: a heap out-of-bounds read in
zone_status(),SERVFAILfor deeper wildcard answers (#3161) and lost pipelined TCP answers (#3167). - Via dnsmasq: a heap out-of-bounds write in
blockdata_read(), a DNS name buffer overflow and an off-by-one in the DHCPv6 FQDN option. - Via dnsmasq: a TFTP caching error, an empty CNAME alias from a space before a comma, and a failed realloc in
poll_listen(). - Two config changes through the API at the same time could lose one of them (#3184).
- A
PATCHofwebserver.api.excludeDomainsorexcludeClientscould free the array under a running Query Log or top list request (#3244). - A TCP worker forked during a config write kept
pihole.toml.lockheld for up to 300 s, and every config write waited for it. - The webserver could spin at 100% CPU and stop accepting connections when two listening sockets became ready at once (#2959, #3301).
- Via CivetWeb: a
HEADrequest to a Lua page or the error page got the body, a Teleporter upload with a space in its file name was refused, and an unsatisfiableRangegot a 206 instead of a 416 (#3340). - A crashed thread could leave FTL hanging instead of exiting, and webserver threads used the non-reentrant
getpwuid()/getgrgid()(#3029). /api/info/systemreported the host's load inside containers (#3267).FTLCONF_variables were ignored when FTL started withoutpihole.toml.- A second
pihole-FTLrewrote the config before noticing that FTL was already running. - Without a password, a link to the dashboard from another site was answered with 403.
- Queries of DNS type 0 stored by FTL v5 were skipped on import.
misc.hide_dnsmasq_warnandmisc.hide_connection_errordid not hide the warnings fromFTL.log(#3003).- A malformed password hash in
pihole.tomlleaked memory on every login attempt, and an app-password login counted twice against the rate limit (#3334). pihole -gstarted through the API inherited FTL's sockets and stopped when the client stopped reading (#3335).- A client whose slot was reused during its name lookup got the old client's name (#3328).
- An RTC whose time could not be read was never set (#3332).
pihole-FTL --config -trequired a writable config (#3338), and two misleading log lines on a first start withoutpihole.toml(#3324).- The reply to a duplicate query was logged as unknown, a shared-memory resize race,
pihole-FTL wait-formissing lines, and undefined behaviour in the addinfo cache.
Behaviour changes to be aware of
- Regex filters: an omitted lower bound (
{,n},{,}) now means{0,n}and{0,}. More than three nested approximate-matching groups are rejected, and so is a back-reference inside an unbounded repetition. webserver.acl: IPv4 entries now match IPv4 clients on every port, including dual-stack ones. IPv6 entries other than::ffff:a.b.c.donly match IPv6 clients, so[::]/0no longer admits IPv4 clients anywhere.- App sessions without
webserver.api.app_sudoand CLI sessions get a 403 fromGET /api/auth/sessionsandDELETE /api/auth/session/{id}. A session can still end itself withDELETE /api/auth. - A password set with
pihole setpasswordorpihole-FTL --configwhile FTL is running is no longer overwritten by the next config change made through the web interface. dns.cnameRecordsentries whose names are not valid domains, or whose TTL does not fit into an int, are rejected (#3256).- A request with more than 64 headers is refused instead of losing the rest of them (#3340).
/api/info/systemanswers with an error instead of zeros when the load averages cannot be read.DELETE /api/dhcp/leases/{ip}answers 503 instead of 400 when the resolver did not get to it in time (#3333).- With
misc.readOnly, a missingpihole.tomlis still written.
Full Changelog: v6.8...v6.9