Skip to content

vminit: bump insomniacslk/dhcp past the nclient4 ReadFrom panic fix - #269

Open
thc1006 wants to merge 1 commit into
containerd:mainfrom
thc1006:bump-insomniacslk-dhcp-583
Open

vminit: bump insomniacslk/dhcp past the nclient4 ReadFrom panic fix#269
thc1006 wants to merge 1 commit into
containerd:mainfrom
thc1006:bump-insomniacslk-dhcp-583

Conversation

@thc1006

@thc1006 thc1006 commented Aug 16, 2026

Copy link
Copy Markdown

The guest side of nerdbox brings up networking with an nclient4 DHCPv4 client. configureDHCP in internal/vminit/vmnetworking/dhcp.go creates it with nclient4.New (line 50) and calls c.Request(ctx) (line 57); RenewLoop later calls c.Renew. That is the default broadcast client, so replies come back through BroadcastRawUDPConn.ReadFrom.

Before insomniacslk/dhcp#583, ReadFrom computed the DHCP length as ipPayloadLen - 8 without 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/, and go mod verify pass, go mod tidy leaves go.mod and go.sum unchanged, and the only vendored code touched is under insomniacslk/dhcp. I wrote #583 upstream.

Copilot AI lite review requested due to automatic review settings August 16, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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>
Copilot AI review requested due to automatic review settings August 16, 2026 16:26
@thc1006
thc1006 force-pushed the bump-insomniacslk-dhcp-583 branch from 93d1a2f to 750a2a3 Compare August 16, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@thc1006 thc1006 changed the title vminit: bump insomniacslk/dhcp past the nclient4 ReadFrom DoS fix vminit: bump insomniacslk/dhcp past the nclient4 ReadFrom panic fix Aug 16, 2026
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.

4 participants