Repository navigation
Drop DNS lookups from apps block-all has no name for - #86
javier20dev25 wants to merge 2 commits into
Conversation
In block-all, mDNSResponder's lookups for an app went through whatever the app: the resolver is reachable on port 53 in every mode, and the filter read and passed the flow. An app that no rule and no Apple service names has no connection an answer could serve, so its queries, whose names it writes, were a way out on their own. decide now reads a delegated lookup only when the app has a rule or the Apple services table covers it, and drops it as dns_no_rule otherwise. The resolver's own lookups still pass, and so do the extension's: its address checks resolve hosts through the same resolver, under its own identity and with no rule. That identity is CodeIdentity.current() and is compared whole, signing id and team, so another Developer ID cannot claim it. Ask mode is unchanged: an unknown app has to resolve before it can be asked about. An app a rule names can still put data in query names to any authoritative server; tying answers to the rule's names is the NEDNSProxyProvider work the plan already lists. blockAllDropsLookupsFromAnAppWithNoRule covers a probe and an ad-hoc app with no rule, an app a rule names, the resolver, the extension with and without its identity, ask mode and accept-all.
|
@javier20dev25 is attempting to deploy a commit to the VT's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for this, and for writing it the way the repo is written. I applied the commit on top of current main (it is based on a2b5b89, from before 1.0.8). It builds with warnings as errors and the 663 tests pass, yours included. Before it can go in:
One question: how did you run the reproduction? On a build signed with your own Developer ID, or against |
|
Pushed
On mDNSResponder: the repo records that lookups it makes for an app arrive under that app's audit token in On the reproduction question: I did not run it on a build signed with my Developer ID. This machine has no macOS or Swift toolchain; the reasoning and tests were against |
|
Checklist against your review, with evidence:
On your question: the reproduction was reasoned against Evidence hashes:
I am not claiming the Mac-side behaviour is verified here. |
|
Thanks for the second commit. Points 1, 4 and 5 are in as asked, and the startup log for 3 is right. I applied both commits on top of current main (they conflict in CHANGELOG.md and FlowReportTests.swift; the Unreleased entry goes above 1.1.1). It builds with warnings as errors, and 661 of the 663 tests pass. The two that fail are yours, in Two more things: please rebase on main, and I'll run the tests again here. And the description says "I reproduced it with a small program that resolves names it puts data into", while your reply says the reproduction was reasoned from After that I'll do the signed-build run in |
What
Apple's resolver stays reachable on port 53 in every mode, and in block-all the filter read and passed every app's lookups. An app that no rule and no Apple service names cannot connect anywhere, so an answer cannot serve it: its queries, whose names it writes, were a way out on their own, a plain DNS tunnel. I reproduced it with a small program that resolves names it puts data into; the flow was read and passed before this change.
Change
FilterPolicy.decidenow reads a delegated lookup only when the app has a rule or the Apple services table covers it. Otherwise it drops the flow withdns_no_rulebefore the app can use an answer.Two identities keep passing:
CodeIdentity.current()and is compared whole (signing id and team), so another Developer ID cannot claim it.Ask mode is untouched, since an unknown app has to resolve before it can be asked about. Accept-all is untouched.
Tests
blockAllDropsLookupsFromAnAppWithNoRulecovers:dns_no_rule;filterIdentity: read; without it:dns_no_rule;Notes
cd macos && swift test) is the first real check of it.NEDNSProxyProviderthe plan already lists.docs/plan.mdupdates the DNS-in-block-all row with the new behaviour and what remains.