Skip to content

2026-11-19

Choose a tag to compare

@github-actions github-actions released this 19 Nov 23:39
· 2 commits to main since this release
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