From e0df6b178a020de90064291dea5b67f258323e48 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Wed, 13 Aug 2025 16:46:07 -0700 Subject: [PATCH] migrate kubeadm static pod hashing to fnv-1a 128bit fnv-1a should be drop-in for md5 while being fast and non-obsolete for non-cryptographic purposes. --- cmd/kubeadm/app/util/staticpod/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kubeadm/app/util/staticpod/utils.go b/cmd/kubeadm/app/util/staticpod/utils.go index b49940d6c9d..c5110eb94c6 100644 --- a/cmd/kubeadm/app/util/staticpod/utils.go +++ b/cmd/kubeadm/app/util/staticpod/utils.go @@ -18,9 +18,9 @@ package staticpod import ( "bytes" - "crypto/md5" "fmt" "hash" + "hash/fnv" "io" "math" "net/url" @@ -373,7 +373,7 @@ func ManifestFilesAreEqual(path1, path2 string) (bool, string, error) { return false, "", err } - hasher := md5.New() + hasher := fnv.New128a() DeepHashObject(hasher, pod1) hash1 := hasher.Sum(nil)[0:] DeepHashObject(hasher, pod2)