Skip to content

fix: AllowList DNS exemption for guest-hardcoded resolvers - #40

Merged
danbugs merged 2 commits into
mainfrom
fix/windows-dns-resolvers
May 15, 2026
Merged

fix: AllowList DNS exemption for guest-hardcoded resolvers#40
danbugs merged 2 commits into
mainfrom
fix/windows-dns-resolvers

Conversation

@danbugs

@danbugs danbugs commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Include well-known public DNS (Google 8.8.8.8/8.8.4.4, Cloudflare 1.1.1.1/1.0.0.1) in the AllowList port-53 exemption alongside host resolvers
  • Add tests for AllowList DNS behavior: well-known resolvers allowed, arbitrary IPs still blocked
  • Add test for BlockList DNS: non-blocked DNS IPs are allowed
  • Bump version to 0.4.0

Root cause

The guest's /etc/resolv.conf hardcodes 8.8.8.8 and 8.8.4.4, but the AllowList DNS exemption only covered the host's resolvers (from /etc/resolv.conf or ipconfig /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 --lib passes on Linux (48/48) and Windows (41/41)
  • cargo clippy --all-targets -- -D warnings clean on both platforms
  • CI: all checks green including networking-py with --net

danbugs added 2 commits May 15, 2026 13:38
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>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@danbugs
danbugs merged commit 0bcbd38 into main May 15, 2026
79 checks passed
@danbugs
danbugs deleted the fix/windows-dns-resolvers branch May 15, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant