dhcp: bump insomniacslk/dhcp for nclient4 ReadFrom panic fix - #1290
Open
thc1006 wants to merge 1 commit into
Open
dhcp: bump insomniacslk/dhcp for nclient4 ReadFrom panic fix#1290thc1006 wants to merge 1 commit into
thc1006 wants to merge 1 commit into
Conversation
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
force-pushed
the
bump-insomniacslk-dhcp-583
branch
from
August 16, 2026 16:26
67323b9 to
a6ae166
Compare
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 dhcp IPAM plugin uses
insomniacslk/dhcp/dhcpv4/nclient4as its client.plugins/ipam/dhcp/lease.gocallsnclient4.Newon the acquire and renew paths (newDHCPClient, noWithUnicast), so it opens the default broadcast raw socket and reads throughBroadcastRawUDPConn.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 vendoredconn_unix.go. This moves to the #583 merge commit (v0.0.0-20260719225207-c76316d4aa82) and refreshes the vendor tree withgo mod vendor. Onlyinsomniacslk/dhcpmoves;go build ./...andgo mod verifypass. I wrote #583 upstream. No CVE for it, and I haven't tried to reproduce a crash in the plugin.