fix: AllowList DNS exemption for guest-hardcoded resolvers - #40
Merged
Conversation
Signed-off-by: danbugs <danilochiarlone@gmail.com>
The AllowList DNS exemption only covered the host's resolvers from /etc/resolv.conf, but the guest hardcodes 8.8.8.8/8.8.4.4 in its initrd. On any host with different resolvers, AllowList silently broke DNS resolution. Add Google (8.8.8.8, 8.8.4.4) and Cloudflare (1.1.1.1, 1.0.0.1) to the exempted resolver set. Port 53 to arbitrary IPs is still blocked, preserving the anti-exfiltration property. Signed-off-by: danbugs <danilochiarlone@gmail.com>
Contributor
There was a problem hiding this comment.
Linux Benchmarks
Details
| Benchmark suite | Current: bf35761 | Previous: 110b50d | Ratio |
|---|---|---|---|
hello_world (median) |
20 ms |
10 ms |
2 |
pandas (median) |
100 ms |
80 ms |
1.25 |
density (per VM) |
7 MB |
7 MB |
1 |
snapshot (disk) |
385 MiB |
385 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
Contributor
There was a problem hiding this comment.
Windows Benchmarks
Details
| Benchmark suite | Current: bf35761 | Previous: 110b50d | Ratio |
|---|---|---|---|
hello_world (median) |
236 ms |
241 ms |
0.98 |
pandas (median) |
716 ms |
754 ms |
0.95 |
density (per VM) |
6 MB |
6 MB |
1 |
snapshot (disk) |
393 MiB |
393 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
The guest's
/etc/resolv.confhardcodes8.8.8.8and8.8.4.4, but the AllowList DNS exemption only covered the host's resolvers (from/etc/resolv.conforipconfig /all). On any host where those don't match (CI runners, corporate networks, etc.), AllowList silently broke DNS resolution.Port 53 to arbitrary IPs is still blocked — preserving the anti-exfiltration property from the original audit fix (PR #32).
Test plan
cargo test --libpasses on Linux (48/48) and Windows (41/41)cargo clippy --all-targets -- -D warningsclean on both platformsnetworking-pywith--net