Skip to content

Require Go 1.26.3+: earlier releases break TLS under fips140=only - #49

Merged
JackDoan merged 1 commit into
mainfrom
go-1.26.3
Sep 8, 2026
Merged

JackDoan merged 1 commit into
mainfrom
go-1.26.3

Conversation

@JackDoan

@JackDoan JackDoan commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Problem

A client built with Go < 1.26.3 running under GODEBUG=fips140=only cannot complete any TLS handshake with the Defined Networking API:

crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode

This is golang/go#78372: under fips140=only, the TLS client still attempts to generate the default X25519MLKEM768 key share, which is hard-disabled in enforce mode. Fixed upstream in go1.26.3.

Fix

Pin go 1.26.3 in go.mod so consumers (dnclient release builds) cannot silently produce FIPS-broken binaries with an older toolchain.

Runtime workaround for binaries already built with an affected Go: GODEBUG=fips140=only,tlsmlkem=0.

Verification

  • go build ./... and full test suite pass on go1.26.3+.
  • GOTOOLCHAIN=go1.26.0 go build ./... is now correctly refused by the go directive.
  • End-to-end: a dnclient built with go1.26.3 enrolled into a P256 network under plain GODEBUG=fips140=only (see https://github.com/DefinedNet/dnclient/pull/885).

Under GODEBUG=fips140=only, Go < 1.26.3 fails every TLS handshake while
generating the default X25519MLKEM768 key share (golang/go#78372):

    crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode

so a FIPS-enforced client cannot reach the Defined Networking API at all.
Pin the minimum toolchain to the first release with the upstream fix.
@JackDoan JackDoan self-assigned this Sep 8, 2026
@JackDoan
JackDoan requested a review from johnmaguire September 8, 2026 20:35
@JackDoan
JackDoan merged commit 5f5ecb3 into main Sep 8, 2026
1 check passed
@JackDoan
JackDoan deleted the go-1.26.3 branch September 8, 2026 20:35
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