Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGH is non-compliant with RFC 7873 and RFC 9018 DNS Cookies #7183

Open
3 tasks done
vincejv opened this issue Aug 11, 2024 · 2 comments
Open
3 tasks done

AGH is non-compliant with RFC 7873 and RFC 9018 DNS Cookies #7183

vincejv opened this issue Aug 11, 2024 · 2 comments

Comments

@vincejv
Copy link

vincejv commented Aug 11, 2024

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to request a feature or enhancement and not ask a question

The problem

AdGuardHome is non-compliant with RFC 7873 and RFC 9018 DNS Cookies

DNS Cookies are a lightweight DNS transaction security mechanism that
provides limited protection to DNS servers and clients against a
variety of increasingly common denial-of-service and amplification/
forgery or cache poisoning attacks by off-path attackers. DNS
Cookies are tolerant of NAT, NAT-PT (Network Address Translation -
Protocol Translation), and anycast and can be incrementally deployed.
(Since DNS Cookies are only returned to the IP address from which
they were originally received, they cannot be used to generally track
Internet users.)

Proposed solution

Create and return server cookies for clients that send client cookies.

Alternatives considered and additional information

No response

@vincejv
Copy link
Author

vincejv commented Aug 11, 2024

Unbound has already implemented it, not sure if it applies to AGH as it's not a recursive resolver, at least it should forward the client cookies to Unbound or the Upstream DNS servers???

@saint-lascivious
Copy link

saint-lascivious commented Sep 18, 2024

I'm unsure if this comment belongs here, or whether it should be considered an independent bug report or feature request, but perhaps a discussion/bump here wouldn't hurt either way.

In the interim between the semi immediate future and any eventual DNS Cookie specification compliance, AGH (or dnsproxy?) doesn't need to explicitly support DNS cookies itself in order for DNS cookies to function. It could "pull a dnsmasq/FTLDNS" and be happy to forward existing OPT RRs in queries/replies unmolested, which as it stands does not seem to be the case.

In this way clients can still validate the exchange provided the client themselves and AGH/dnsproxy's upstream(s) support it, and these days a good chunk of installs are likely to be paired with one or more local recursive nameservers that does.

Part of the reason I'm unsure whether or not this belongs here is that that approach is less "support DNS cookies", and more "don't accidentally break DNS cookies".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants