Skip to content

go.mod: bump insomniacslk/dhcp past the nclient4 ReadFrom panic fix - #1548

Open
thc1006 wants to merge 1 commit into
jetkvm:devfrom
thc1006:bump-insomniacslk-dhcp-583
Open

go.mod: bump insomniacslk/dhcp past the nclient4 ReadFrom panic fix#1548
thc1006 wants to merge 1 commit into
jetkvm:devfrom
thc1006:bump-insomniacslk-dhcp-583

Conversation

@thc1006

@thc1006 thc1006 commented Aug 16, 2026

Copy link
Copy Markdown

The DHCPv4 client in pkg/nmlite/jetdhcpc builds its nclient4 client with nclient4.New (dhcp4.go), without WithUnicast, so both client.Request and client.Renew read replies through BroadcastRawUDPConn.ReadFrom.

The pin here (v0.0.0-20250919081422-f80a1952f48e) predates the fix. There ReadFrom subtracted the 8-byte UDP header from the IPv4 payload length without checking the payload was at least 8 bytes, so a short or malformed reply gave a negative slice bound and panicked. That's insomniacslk/dhcp#583, which I wrote (merged 2026-07-19). The fixed path drops the malformed frame and keeps reading instead of passing a negative length to buf.Consume.

This moves the module to the #583 merge commit; only go.mod and go.sum change. I haven't reproduced this against a running JetKVM, and whether a hostile reply reaches the client depends on the DHCP setup on the link, so it's defense in depth for the lease and renew path rather than a confirmed remote crash. Verified with go build ./pkg/... and go vet ./pkg/nmlite/jetdhcpc/...; a full go build ./... also needs the RK native libraries and generated frontend assets, which are unrelated to this change.

@CLAassistant

CLAassistant commented Aug 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

The DHCPv4 client in pkg/nmlite/jetdhcpc builds its nclient4 client with nclient4.New in pkg/nmlite/jetdhcpc/dhcp4.go, without WithUnicast, so it uses the default broadcast raw-socket connection. Replies for both client.Request and client.Renew come back through nclient4's BroadcastRawUDPConn.ReadFrom.

The pin this repo was on, v0.0.0-20250919081422-f80a1952f48e, predates the fix for that read path. There ReadFrom subtracted the 8-byte UDP header from the IPv4 payload length without first checking that the payload was at least 8 bytes long, so a short or malformed reply gave a negative slice bound and panicked. That is insomniacslk/dhcp#583, which I wrote and which merged upstream on 2026-07-19.

This moves the module to v0.0.0-20260719225207-c76316d4aa82, the pseudo-version at the jetkvm#583 merge commit. The fixed ReadFrom path drops the malformed frame and continues reading, instead of passing a negative length to buf.Consume. Only go.mod and go.sum change.

I have not reproduced this against a running JetKVM. Whether a hostile reply can reach the client depends on the DHCP setup on the link, so this is defense in depth for the lease request and renew path rather than a confirmed remote crash.

Verified with go build ./pkg/... and go vet ./pkg/nmlite/jetdhcpc/... on the new pin. A full go build ./... additionally needs the RK native libraries and the generated frontend assets, which are unrelated to this change.

No CVE or GHSA is currently assigned to insomniacslk/dhcp#583 as of 2026-08-16. This PR picks up an upstream malformed-frame panic fix. I verified that this repository reaches the affected raw receive path, but I have not independently demonstrated project-specific exploitability or wide impact.

Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
@thc1006
thc1006 force-pushed the bump-insomniacslk-dhcp-583 branch from d5842f6 to 0bb01c7 Compare August 16, 2026 16:25
@thc1006 thc1006 changed the title go.mod: bump insomniacslk/dhcp past the nclient4 ReadFrom DoS fix go.mod: 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.

2 participants