Skip to content

dhcp: bump insomniacslk/dhcp for nclient4 ReadFrom panic fix - #1290

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

dhcp: bump insomniacslk/dhcp for nclient4 ReadFrom panic fix#1290
thc1006 wants to merge 1 commit into
containernetworking:mainfrom
thc1006:bump-insomniacslk-dhcp-583

Conversation

@thc1006

@thc1006 thc1006 commented Aug 16, 2026

Copy link
Copy Markdown

The dhcp IPAM plugin uses insomniacslk/dhcp/dhcpv4/nclient4 as its client. plugins/ipam/dhcp/lease.go calls nclient4.New on the acquire and renew paths (newDHCPClient, no WithUnicast), so it opens the default broadcast raw socket and reads through BroadcastRawUDPConn.ReadFrom. Before insomniacslk/dhcp#583 that path subtracted the 8-byte UDP header from the IPv4 payload length without checking the payload was that long, so a malformed reply on the link gave a negative slice length and panicked the plugin.

The current pin (v0.0.0-20240829085014-a3a4c1f04475, 2024-08) still has the unchecked subtraction in the vendored conn_unix.go. This moves to the #583 merge commit (v0.0.0-20260719225207-c76316d4aa82) and refreshes the vendor tree with go mod vendor. Only insomniacslk/dhcp moves; go build ./... and go mod verify pass. I wrote #583 upstream. No CVE for it, and I haven't tried to reproduce a crash in the plugin.

The dhcp IPAM plugin uses insomniacslk/dhcp/dhcpv4/nclient4 as its
DHCP client. lease.go calls nclient4.New for the acquire and renew
paths, which open the default broadcast raw socket. Its receive
path, BroadcastRawUDPConn.ReadFrom, subtracted the 8 byte UDP header
length from the IPv4 payload length without first checking that the
payload was at least that long, so a malformed reply on the link
produced a negative slice length and panicked the plugin.

insomniacslk/dhcp#583 adds the missing bounds check. This moves the
pin from the 2024-08 snapshot to the 2026-07-28 one that includes it
and refreshes the vendored tree.

Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
@thc1006
thc1006 force-pushed the bump-insomniacslk-dhcp-583 branch from 67323b9 to a6ae166 Compare August 16, 2026 16:26
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