-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
DNS leakage when only one DNS server is set in a NetVM #9011
Comments
Only the I don't see a leak if the firewall rules are not considering there are two dns servers configured, not only one. It is the behaviour of resolv.conf to fallback to the secondary dns server when the first one fails. You can:
You can do both or either one. From resolv.conf man page:
|
I can confirm this bug. With a single DNS server (e.g.
Instead, it should generate:
EDIT: |
Looks like it only affects debian, cf. https://forum.qubes-os.org/t/github-issue-9011-dns-leakage-when-only-one-dns-server-is-set-in-a-netvm/27022/13 |
I am working on a patch for this. I believe @DemiMarie wrote the qubes-setup-dnat-to-ns during transition from iptabels to nftables. I have one remaining unsolved question. What is the resolve1_proxy doing in dbus solution? It is not used. Is it OK if it is deleted? Here is the patch (so far):
|
@alimirjamali Yes, it is safe to delete the unused variable. |
I submitted the patch. I appreciate if this could get a little bit higher priority for review as it is a security and privacy matter for people who are using Debian for their sys-net. Diagnosis details and security implications is available in the 1st post of forum thread. |
Fixes: QubesOS/qubes-issues#9011 (cherry picked from commit 6473a28)
Seen in 4.2.
One of my machines has a NetVM with a physical network interface, manually set to have only one DNS server (local). In this scenario, the Qubes
dnat-dns
chain contains the following:That's sensible. Only one DNS server is mapped.
However, since the configuration of the qubes attached to this NetVM in fact contains internal Qubes IPs 10.139.1.1 and 10.139.1.2, sometimes (when the local DNS server fails to respond on time) the qubes issue a DNS request to 10.139.1.2, which is in fact routed out of the VM because nothing intercepts it (the
dnat-dns
chain doesn't have an entry for it.(I caught this by observing very funny incomplete NAT entries in my border router, all mentioning internal Qubes IPs.)
Ideally, the
dnat-dns
chain adds rules for both IPs, and if it needs to repeat the same single DNS server IP address in both pairs of rules, then it should do so.Thanks in advance for fixing this security issue.
In the meantime, to mitigate this, I've configured my custom firewalling to drop such traffic at the border router:
The text was updated successfully, but these errors were encountered: