vminit: bump insomniacslk/dhcp past the nclient4 ReadFrom panic fix - #269
Open
thc1006 wants to merge 1 commit into
Open
vminit: bump insomniacslk/dhcp past the nclient4 ReadFrom panic fix#269thc1006 wants to merge 1 commit into
thc1006 wants to merge 1 commit into
Conversation
nerdbox's VM init networking uses nclient4, whose BroadcastRawUDPConn.ReadFrom could compute a negative DHCP length and panic on a malformed reply. That was fixed in insomniacslk/dhcp#583; this bumps the module past that commit. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
thc1006
force-pushed
the
bump-insomniacslk-dhcp-583
branch
from
August 16, 2026 16:26
93d1a2f to
750a2a3
Compare
akerouanton
approved these changes
Aug 18, 2026
Kern--
approved these changes
Aug 24, 2026
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 guest side of nerdbox brings up networking with an nclient4 DHCPv4 client.
configureDHCPininternal/vminit/vmnetworking/dhcp.gocreates it withnclient4.New(line 50) and callsc.Request(ctx)(line 57);RenewLooplater callsc.Renew. That is the default broadcast client, so replies come back throughBroadcastRawUDPConn.ReadFrom.Before insomniacslk/dhcp#583,
ReadFromcomputed the DHCP length asipPayloadLen - 8without checking the IPv4 payload was at least 8 bytes, so a reply claiming a shorter payload gave a negative length and panicked on a bad slice bound. Since this runs in the VM's init process, a malformed reply on the segment can bring init down rather than just failing the lease. I'm not claiming more than a panic: it needs something that can put a crafted reply on that segment, like the DHCP server or a host injecting frames onto it.nerdbox pins the module at
v0.0.0-20250919081422-f80a1952f48e(2025-09), before the fix. This moves it to the #583 merge commit and re-vendors.go build ./...,go vet ./internal/vminit/vmnetworking/, andgo mod verifypass,go mod tidyleaves go.mod and go.sum unchanged, and the only vendored code touched is under insomniacslk/dhcp. I wrote #583 upstream.