oxidecomputer / oxidecomputer/omicron

dns server answers any incoming message as if it were a query

Open
#6,411 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

i noticed this while looking at an implementation supporting ServerFuture... conspicuously, we do not check the request was a Query (or, surprise to me: a Query can have Opcode::Update?!) in our roughly-analogous code.

as a validation, i adjusted this test helper from #6308 away from trust_client.query, to trust_client.notify(name, DNSClass:IN, RecordType::AAAA, None::<trust_dns_proot::rr::RecordSet>) instead. this has the client send a nonsense NOTIFY for an AAAA record which if faithfully interpreted probably should tell the server that the record should be refreshed from whoever is authoritative for the name. instead, we return the AAAA record as if it was a query, and the test still passes!

much like the implementation in hickory-dns, we ought to only be answering queries, and least logging or ignoring requests with parameters we don't know.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in dns-server/src/dns_server.rs around the roughly analogous request handling at lines 260-270, then inspect the test helper changed in PR #6308. Use trust_client.notify with the existing test setup to cover a non-query request. Done means the DNS server answers queries only and logs or ignores requests with unsupported parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.