-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Crashes with env var GODEBUG=fips140=only #13651
Description
Environmental Info:
K3s Version: All post golang 1.24
Describe the bug:
K3S does not startup when setting environment variable: GODEBUG=fips140=only
This is due to sha1 hash usage in cluster/encrypt: https://github.com/k3s-io/k3s/blob/main/pkg/cluster/encrypt.go#L31
FIPS mode can be checked before selecting a hash see: a8161f4 as an example.
One impact to this would be, all cluster members would need to have FIPS mode enabled to derive the same key from the passphrase.
An additional thing to note is SHA1 is no longer considered secure so migrating to a different hash algorithm regardless of FIPS mode may be desirable.
https://en.wikipedia.org/wiki/SHA-1
I'm willing to stand up some PRs to fix this if it's a change that would be accepted.
Steps To Reproduce:
- Install K3S
- set environment variable GODEBUG=fips140=only on the process start/restart it
Expected behavior:
K3S Starts up
Actual behavior:
K3S Crashes
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status