Update the package lists before installing Valgrind - #102
Merged
Watson1978 merged 2 commits intoJul 31, 2026
Conversation
DNSResolver built every query with the constant transaction ID 2 and authenticated the reply with nothing but `id == 2`, while on_readable read the datagram off a never-connected UDPSocket with `recvfrom_nonblock(...).first`, discarding the sender. Any host that could land a UDP packet on the resolver's ephemeral port could therefore choose the address a hostname resolved to, and Coolio::TCPSocket.connect would open the application's session to it. Give each query a random 16-bit transaction ID from SecureRandom, and accept a datagram only when it carries that ID and arrives from port 53 of an address this query was actually sent to. The check runs before the response is parsed. A datagram that fails it is ignored rather than turned into a failure, so a single spoofed packet can no longer deny the resolution either; the existing TIMEOUT/RETRIES budget still bounds the wait. Nameservers may be given as hostnames, so send_request resolves the nameserver to a numeric address and remembers it, caching only successful lookups. The constructor keeps accepting whatever it accepted before, an unresolvable nameserver still surfaces as SocketError from the same place, and one that is only transiently unresolvable recovers on the next retry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Memcheck workflow installs Valgrind without refreshing apt's package
lists first, so it resolves libc6-dbg (a recommended dependency of
valgrind) from the runner image's cached index. When Ubuntu publishes a
new point release of glibc, the cached version is gone from the mirror and
every job in the matrix fails:
Err:9 ... noble-updates/main amd64 libc6-dbg amd64 2.39-0ubuntu8.7
404 Not Found
E: Failed to fetch .../libc6-dbg_2.39-0ubuntu8.7_amd64.deb
Run apt-get update first so the install resolves against what the mirror
actually has.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The Memcheck workflow installs Valgrind without refreshing apt's package lists first, so
libc6-dbg(a recommended dependency ofvalgrind) is resolved from the runner image's cached index. Once Ubuntu publishes a new point release of glibc, the cached version is no longer on the mirror and the step fails:This is currently breaking every job in the matrix, on any push or pull request — for example https://github.com/socketry/cool.io/actions/runs/30611416336.
Running
apt-get updatefirst makes the install resolve against what the mirror actually has.--no-install-recommendswould also avoid the failure by skippinglibc6-dbgandgdbentirely, but glibc's debug symbols are worth keeping for Valgrind's stack traces.🤖 Generated with Claude Code