Skip to content

build(deps): bump insomniacslk/dhcp for nclient4 malformed-frame panic fix - #1

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

build(deps): bump insomniacslk/dhcp for nclient4 malformed-frame panic fix#1
thc1006 wants to merge 1 commit into
ShippingBytes:mainfrom
thc1006:bump-insomniacslk-dhcp-583

Conversation

@thc1006

@thc1006 thc1006 commented Aug 16, 2026

Copy link
Copy Markdown

metallo-inspect runs as PID 1 in the initramfs and brings up the network with DHCP before it inspects the machine. dhcpConfigure in cmd/metallo-inspect/netsetup.go uses nclient4.New, the broadcast raw-UDP client, so the lease request reads its replies through BroadcastRawUDPConn.ReadFrom.

The version pinned here is from just before insomniacslk/dhcp#583. Without that fix, a DHCP frame whose IPv4 payload is too small to hold a UDP header makes ReadFrom compute a negative length and panic on a bad slice index, and on a PID 1 agent that takes the process down. I wrote #583 upstream; it drops the short frame and keeps reading. This moves the pin to the merge commit, so only the insomniacslk/dhcp line and its two checksums change.

There's no CVE for it and I haven't tried to force a crash inside metallo, so I kept the change to the bump. make verify (build, go test -race, licenses) is green locally.

…c fix

metallo-inspect solicits DHCP on the default broadcast client
(nclient4.New in cmd/metallo-inspect/netsetup.go), and client.Request
reaches BroadcastRawUDPConn.ReadFrom on the raw socket. Before this bump
that path computed the DHCP payload length as ipHdr.payloadLength() - 8
without checking the IPv4 payload is large enough to hold a UDP header,
so a frame declaring fewer than 8 payload bytes gave a negative length
into buf.Consume and panicked with a slice bounds error.

Upstream insomniacslk/dhcp#583 adds an ipPayloadLen < udpHdrLen guard
that drops the malformed frame and keeps reading. Move from the pre-fix
pin v0.0.0-20260603135910-a415979eb11e to the merge commit
v0.0.0-20260719225207-c76316d4aa82. No other module changes; build and
tests stay green.

Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
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