Skip to content

Releases

2026-11-24

Choose a tag to compare

@github-actions github-actions released this 24 Nov 17:56
Implement WireRecord for SVCB and generic records

Summary:
`Rsvcb` (`B`) and `Raux` (`:`) were the only non-composite, non-map record types without a `WireType()`, so callers that expand a data line into the records it serves (following `CompositeRecord.DerivedRecords()` down to `WireRecord`s) could not see them. `Rsvcb` returns `TypeSVCB`, matching `Rhttps`, and `Raux` returns the type number from its second field.

___

landed-with-radar-review

Differential Revision: D134241409

fbshipit-source-id: ce7f7f3a5ff823c02bcec60abfe6ac1d54ffe29b

2026-11-20

Choose a tag to compare

@github-actions github-actions released this 20 Nov 18:19
Log RunQueries and ReportMetrics errors and the real -query-type error

Summary:
https://www.internalfb.com/monitoring/oncall_operator?board=2597931527298631&workItem=30401988492724438
Please Accept the diff and let Oncall Operator's auto-lander attempt to land it. Shipping it yourself can make you the commit's pusher, and Phabricator doesn't allow the pusher to close the post-land owner review.

 ---

## The issue
- Three error checks in `main.go` test the function-scope `err`, which is nil at that point, instead of the error the call just returned. A bad `-query-type` exits with `FATA <nil>`. A `RunQueries` failure (its connection could not be set up, for example an unusable `-host` or `-port`) is dropped, so the run ends with 0 queries, no error and exit 0. Every periodic (`-sample`) `ReportMetrics` failure is dropped too.
- The two goroutines also read that shared `err` while `main` writes it for the final report: `go build -race` reports a data race on every `-sample` run.

## The fix
- Log `qtypeErr`, and test `qErr` and `repErr`, the values those calls returned. The goroutines no longer touch the shared `err`, which removes the race.
- The `RunQueries` goroutine now starts with `wg.Go`, which the extra lint engine's `modernize` (`waitgroupgo`) asks for on that block. It behaves the same; it needs Go 1.25 and goose's `go.mod` is at 1.26.
- Left as is: goose still exits 0 when every connection fails to start. Making that fatal would change what callers see, so it is the owners' call.
- The unpublished stack D116776854, D116776853, D116776852 still applies on top of this (one 2-line offset), and the stacked `main.go` builds.

Reviewed By: lima1756

Differential Revision: D133170669

fbshipit-source-id: 9105590ef3f6103f7d2c0658c315e655b3d66268

2026-11-19

Choose a tag to compare

@github-actions github-actions released this 19 Nov 23:39
Don't crash on a root DS query when the root has NS but no SOA

Summary:
A single `. IN DS` query could crash fbdns when the served data has NS records for the root name but no root SOA. For a DS query, `ServeDNSWithRCODE` pops one label to look up the parent zone. The root name has no label to pop, so that lookup got an empty name, which both readers index (`zoneCut[0]` in `db/answer.go`, `reverseZoneNameToBuffer` in `db/answer_sorted.go`). Nothing on the serving path recovers the panic, so the process exited.

The DS branch now skips the parent lookup for the root name. The query gets a referral to the root NS (NOERROR, AA clear), the same answer fbdns gives for other names it has NS records for but is not authoritative for. DS queries for other names are unchanged.

The test compiles its own small database with the new `testaid.CompileTestDBs`, because root NS records in the shared fixture would turn other tests' REFUSED answers into referrals.

Reviewed By: avasylev

Differential Revision: D132480160

fbshipit-source-id: 8ee456a523272901b0c52d25d18ec56c5ac9460c

2026-10-30

Choose a tag to compare

@github-actions github-actions released this 30 Oct 22:43
Pass counters to location plugins

Summary: Allow location plugins to increment counters through the server's stats collector. Add an optional `Counter` interface to `pluginmap.Request` and pass the collector from the DNS handler.

Reviewed By: frankfeir

Differential Revision: D128421981

fbshipit-source-id: 117c1e24390a86392ec192646b9cf74d448b5527

2026-10-27

Choose a tag to compare

@github-actions github-actions released this 27 Oct 16:04
Add fuzzing of FBDNS over UDP, TCP and TLS

Summary:
Adds native Go fuzz tests (`testing.F`) for the FBDNS server.
Each fuzz target starts a full in-process server (CDB test DB, DNSSEC, NSID, whoami, throttle, cache, CNAME chasing) and sends the fuzzed bytes over a real socket:
- `FuzzUDP`: one fuzzed datagram.
- `FuzzTCP`: a fuzzed raw TCP byte stream, so length framing and pipelining are fuzzed too.
- `FuzzTLS`: a fuzzed raw byte stream inside a DoT session.

After every input, the server must answer a valid probe query on the same transport. A panic anywhere in the serving path crashes the process (miekg/dns does not recover handler panics), and a hang or jammed throttle shows up as a probe timeout.

The seed corpus is added with `f.Add`, so the seeds also run as regular unit tests in `fbserver_test`.

`testaid.MkTestCert` now takes `testing.TB` and includes localhost SANs, so the TLS fuzzer can verify the server certificate instead of using `InsecureSkipVerify`.

Fuzzing a corrupted database is not covered here.

___

landed-with-radar-review

Differential Revision: D125733961

fbshipit-source-id: d82f22a50b6596a52cdaf3726aaf9712f54d01b3

2026-10-22

Choose a tag to compare

@github-actions github-actions released this 22 Oct 21:48
Add platform startup hooks to DNSRocks

Summary: Add a generic platform initializer hook to the public `dnsrocks` entry point. This allows for process-level initialization of miscellaneous runtime libraries.

Reviewed By: frankfeir

Differential Revision: D126513129

fbshipit-source-id: e5d3dfaf6fb0d4c2460b8c5887bc7bca0e5da26a

2026-10-12

Choose a tag to compare

@github-actions github-actions released this 12 Oct 20:17
Bump google.golang.org/grpc from 1.83.1 to 1.83.2 in /dnsrocks (#133)

Summary:
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.83.1 to 1.83.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's releases</a>.</em></p>
<blockquote>
<h2>Release 1.83.2</h2>
<h1>Security</h1>
<ul>
<li>server: Reject requests missing both <code>:authority</code> and <code>Host</code> headers with HTTP 400 and status <code>Internal</code>. (<a href="https://redirect.github.com/grpc/grpc-go/pull/9365">grpc/grpc-go#9365</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/winklemad"><code>@​winklemad</code></a></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/grpc/grpc-go/commit/030ee8becb20ce4315d6bf2dfa26bdd876169dc4"><code>030ee8b</code></a> Update version to 1.83.2 (<a href="https://redirect.github.com/grpc/grpc-go/issues/9375">#9375</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/8668b69c167df908b6b3666dcbf40992b9e932a4"><code>8668b69</code></a> cherry-pick <a href="https://redirect.github.com/grpc/grpc-go/issues/9365">#9365</a> to v1.83.x (<a href="https://redirect.github.com/grpc/grpc-go/issues/9366">#9366</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/a3e952d2b7c973b7ec6357676e55a2a9c9faaa0d"><code>a3e952d</code></a> cherry-pick <a href="https://redirect.github.com/grpc/grpc-go/issues/9346">#9346</a> to v1.83.x and update x/net dependency (<a href="https://redirect.github.com/grpc/grpc-go/issues/9369">#9369</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/58f8fd9a002536548ac96e34621d761b29cc4f3e"><code>58f8fd9</code></a> Change version to 1.83.2-dev (<a href="https://redirect.github.com/grpc/grpc-go/issues/9337">#9337</a>)</li>
<li>See full diff in <a href="https://github.com/grpc/grpc-go/compare/v1.83.1...v1.83.2">compare view</a></li>
</ul>
</details>
<br />

Pull Request resolved: https://github.com/facebook/dns/pull/133

Differential Revision: D124822885

Pulled By: lima1756

fbshipit-source-id: 7ac1f78f6806d59d9e3fa854097b4215f05c3605

2026-10-07

Choose a tag to compare

@github-actions github-actions released this 07 Oct 18:15
Make existing-record checks case-insensitive

Summary:
`HasRecord` compared DNS owner names with `==`, even though DNS names are case-insensitive. If an equivalent owner already existed with different ASCII casing, `AdditionalSectionForRecords` could append a duplicate `A` or `AAAA` record.

- Canonicalize the lookup name and owner names in the Answer, Authority, and Additional sections with `dns.CanonicalName`. This applies canonicalization (ASCII lowercase and fully qualified) without Unicode case folding.
- Add mixed-case coverage for all three response sections.

Reviewed By: pdubovitsky

Differential Revision: D123474319

fbshipit-source-id: 7b5e3a7ac939c5c73bbe11880978ffb9d1664841

2026-10-02

Choose a tag to compare

@github-actions github-actions released this 02 Oct 04:07
Dispatch location lookups to plugins

Summary:
This commit enables DNSRocks to dispatch queries which match PluginMap records to their appropriate Plugins. To support somewhat dynamic plugins, plugins have a "registry" and a "factory" so that no plugin is created for any consumer which does not explicitly opt-in to it.

Included in this commit is the "pinned" plugin, used as an end-to-end example and leveraged in unit tests. It will not be enabled in any production deployment (unless explicitly enabled, if desired for some reason).

Plugins have been given higher precedence than the existing Resolver/ECS-based lookup. If none are enabled, none match the queried domain, or the plugin returns a non-answer, DNSRocks continues through the existing lookup path.

Plugins rely on the `init()` mechanism to register themselves.

Reviewed By: virtyaluk

Differential Revision: D118517414

fbshipit-source-id: 01423e6c96e91001a7bf449ac184608afc77ccb6

2026-10-01

Choose a tag to compare

@github-actions github-actions released this 01 Oct 22:26
Validate IP answer flag values

Summary:
The shared parser behind `-ip` and `-ipwithmaxans` could store invalid addresses under `<nil>` and terminate the process with `glog.Fatalf` when a max-answer value was not numeric. Invalid flag values now return ordinary parsing errors without mutating `IPAns`.

- Reject invalid IPs, malformed `IP,maxAns` tuples, and nonpositive or nonnumeric counts.
- Preserve default-count and canonical-IP behavior for valid IPv4 and IPv6 input.
- Render `ipAns.String` as sorted, space-separated `IP,maxAns` entries without empty fields or trailing punctuation.

Reviewed By: bemasc

Differential Revision: D122468457

fbshipit-source-id: 9da1d48acc441a2e641fcf4389e7abaa5fdf2f3c