test: bind the fake resolv.conf at the RESOLVED path, not at a symlink - #587
Merged
Merged
Conversation
CI went red on main and every PR from 2026-09-17 19:21 UTC with panic: integration: TestNoResolverHostFailsFastAndSaysSo has run for more than twice its 10s time budget and is presumed hung naming neither DNS nor bwrap. No snug change between the last green run (1487aec, 14:41) and the first red one (f85489d, 19:21) touches integration code: the delta is the runner's bubblewrap, 0.9.0-1ubuntu0.1 -> 0.9.0-1ubuntu0.2, the CVE-2026-87766 fix, whose second patch "creates and resolves destinations without following symlinks, and rejects mount operations on symlink destinations". /etc/resolv.conf on a systemd-resolved host — every GitHub runner — is a symlink to ../run/systemd/resolve/stub-resolv.conf. Measured under an outer bwrap holding such an /etc: $ bwrap --dev-bind / / --ro-bind $T /etc/resolv.conf -- true bwrap: Can't mount on symlink destination /etc/resolv.conf rc=1 So singleFileResolvConfBind() answered false, every call took the fallback shape (copy the whole of /etc, ~19s each on a runner), and the four calls in TestNoResolverHostFailsFastAndSaysSo blew a 10s budget whose watchdog panics without flushing the test log. Fix: resolvConfDest() = EvalSymlinks("/etc/resolv.conf"), and both the probe and the bind use it. The fixture lands where the symlink points, so hostNameservers()'s plain os.ReadFile still sees it. Literal path when the link dangles, and the probe then answers for that. Three things beside it: - The fallback ANNOUNCES itself on stderr with bwrap's own message. ~19s per call against a 10s budget is the shape that costs the job, and budget()'s panic cannot print a t.Logf. - fakeHostEtc caches per content under TestMain's directory (new integrationTmp), so the fallback costs one copy per process, not one per call. - TestTheFakeResolvConfHarnessReallySubstitutes is the file's only POSITIVE use of the overlay: a fixture naming 198.51.100.53 (TEST-NET-2) must come back out of the sandbox's generated resolv.conf and off --dry-run's screen. Every other assertion here is a negative, and a negative passes just as well when the overlay silently does not apply. Verified: make gate green; SNUG_REQUIRE_SANDBOX=1 make integration-sandbox green (310.223s, engine tests 46 ran, floor 46, podman 6.0.2); and the three DNS tests green under a wrapper reproducing the runner's shape — an /etc whose resolv.conf is a symlink — where the probe previously failed with the message above. Local bwrap is 0.12.0, which carries the same refusal. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
CI red on main and every PR since 2026-09-17 19:21 UTC. Failure names neither DNS nor bwrap:
Runs 35264394910 (main, f85489d), 35265056261, 35266080160 (#585). Three regions, one image, same test.
Cause is not ours
No snug change between last green main (1487aec, 14:41) and first red (f85489d, 19:21) touches integration code — that commit is a comment, two unit test files and a design doc. Delta is the RUNNER:
0.9.0-1ubuntu0.2 is CVE-2026-87766. Second patch: "creates and resolves destinations without following symlinks, and rejects mount operations on symlink destinations".
/etc/resolv.confon a systemd-resolved host — every GitHub runner — is a symlink to../run/systemd/resolve/stub-resolv.conf. Measured under an outer bwrap holding such an /etc (bwrap 0.12.0 locally carries the same refusal):singleFileResolvConfBind()answered false, every call took the fallback shape — copy the whole of /etc, ~19s each on a runner — and four such calls in one test blew a 10sbudget()whose watchdog panics without flushing the test's log. Hence a hang naming nothing.Fix
resolvConfDest()=EvalSymlinks("/etc/resolv.conf"), cached; probe and bind both use it. Fixture lands where the symlink points,hostNameservers()'s plainos.ReadFilefollows the link and sees it. Literal path when the link dangles, probe answers for that.Three things beside it:
t.Logf.fakeHostEtccaches per content under TestMain's dir (newintegrationTmp): fallback costs one copy per process, not one per call.TestTheFakeResolvConfHarnessReallySubstitutes— the file's only POSITIVE use of the overlay. Fixture names 198.51.100.53 (TEST-NET-2); it must come back out of the sandbox's generated resolv.conf and off--dry-run's screen. Every other assertion here is a negative, and a negative passes just as well when the overlay silently does not apply.No production code touched, no golden argv diff, no profile/mount/seccomp/host-integration surface.
Verification
make gategreen.SNUG_REQUIRE_SANDBOX=1 make integration-sandboxgreen, 310.223s,engine tests: 46 ran, floor 46 — podman version 6.0.2.🤖 Generated with Claude Code