Skip to content

Harden DNS Relay #1816

Open
Open

Description

We need to follow up #1689 (comment) to make sure the new DNS relay is hardened. There's been a first pass at this but once we merge and exercise it more + ship the rest of #1266 we'll probably find more issues.

Activity

  1. added
    kind/feature
    area/security
    on Sep 23, 2026
  2. BenTheElder commented on Oct 1, 2026

    @BenTheElder
    CollaboratorAuthor

    Bowei Du (@bowei) are you still taking this one [assign yourself] or should I work on it?

    x-ref #2075

  3. bowei commented on Oct 5, 2026

    @bowei
    Collaborator

    I have a list of things -- but did you have specific items that you already are thinking of?

  4. BenTheElder commented on Oct 5, 2026

    @BenTheElder
    CollaboratorAuthor

    It seems obviously exhaustable by a bad actor (hah!) currently, ... otherwise generally red-teaming and hardening.

  5. destijl commented on Oct 19, 2026

    @destijl
    Collaborator

    🤖 One hardening item for the list, from a recent audit pass at a30a0a68: the relay picks upstream transaction IDs by starting at uint16(rand.Uint32()) from math/rand/v2 and then taking the first free ID (internal/atunnel/dns/pendingreq.go#L116-L118), so concurrent queries get adjacent IDs. Impact is low, because the relay doesn't cache and an off-path spoofer still has to race the upstream answer. If we want to harden it anyway: use crypto/rand for each ID (retrying on collision) and randomize the source port for each upstream query.

  6. added
    prio/P0
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/networkarea/securitykind/featureprio/P0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions