Skip to content

SERVFAIL delegation checks retry dead name server endpoints for every name #483

Backlog

Description

@TMHSDigital

Summary

With NS in -type, every SERVFAIL lookup runs a delegation check that asks the zone's endpoints in order, giving each a full -timeout. Nothing remembers that an endpoint timed out, so every SERVFAIL name tries the dead ones again.

Where

  • internal/scan/delegation.go:105-115 (for _, ep := range endpoints { ... AskDelegation(ctx, ep, name, cfg.Timeout) ... continue })
  • internal/dns/referral.go:40
  • internal/scan/runner.go:694 (called from inside the worker)

Impact

Zones often publish name servers that do not answer scanners (filtered, rate-limited, or IPv6 on a host that drops it). Each SERVFAIL candidate then holds a worker for up to endpoints x timeout, for example 4 to 8 s with 4 name servers that each have an A and an AAAA address. A target where many names SERVFAIL has most workers stuck in these checks.

Suggested fix

Keep per-endpoint health in parentZone with atomic failure counters. Skip an endpoint after a couple of consecutive timeouts, or move answering endpoints to the front. Once every endpoint has failed N times, stop the checks for the scan with one notice, as noticeOnce already does for a lookup failure.

Getting started

  • Relevant files: internal/scan/delegation.go, internal/scan/delegation_test.go
  • How to run tests: go test ./internal/scan -run Delegation

Filed by repo-audit/full-audit at a45b999. Severity: low. Effort: S. audit-key: performance|internal/scan/delegation.go|parentZone.delegation

Activity

  1. added
    good first issue
    performance
    area: scan
    severity: low
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: scangood first issueperformanceseverity: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions