What happened:
Kernel panic on reboot when building v1.19 with FIPS enabled using kernel 5.4.x
What you expected to happen:
Host should reboot without kernel panic and have FIPS enabled
How to reproduce it (as minimally and precisely as possible):
Build v1.19 on 5.4.x kernel with FIPS enabled following https://github.com/awslabs/amazon-eks-ami/pull/513
Anything else we need to know?:
Builds successfully on all versions prior to kernel upgrade from 4.x to 5.4.x https://git.soma.salesforce.com/FORGE/amazon-eks-ami/commit/e3f1b910f83ad1f27e68312e50474ea6059f052d#diff-0a1b54f1420f4f3189806328b24b37ccR10
Error from EC2 console log:
[ 1.389896] alg: ecdh: test failed on vector 2, err=-14
[ 1.392566] Kernel panic - not syncing: alg: self-tests for ecdh-generic (ecdh) failed in fips mode!
[ 1.396551] CPU: 0 PID: 259 Comm: cryptomgr_test Not tainted 5.4.95-42.163.amzn2.x86_64 #1
Environment:
aws eks describe-cluster --name <name> --query cluster.platformVersion): Allaws eks describe-cluster --name <name> --query cluster.version): 1.19uname -a): 5.4.95-42.163.amzn2 amzn2extra-kernel-5.4cat /etc/eks/release on a node):We're currently engaging with the Amazon Linux team to try to root cause this issue and get the kernel patched to fix it. In the meantime, there are a couple options for customers to unblock themselves until we solve the root issue.
Disclaimer: These steps may not be realistic for all customers, and I have not validated these other than that they successfully use the 4.14 kernel. The 4.14 kernel is tested with AMIs built for k8s version 1.18 and below.
Pass in 4.14 "kernel_version" when building AMI
If a customer builds their own AMI with the amazon-eks-ami GitHub repo, they can set 4.14 as the kernel version and build a new AMI.
Downgrade the kernel
I haven't done any extensive testing on this, so it would be best if customers were able to test in a dev environment, but they could downgrade the kernel before using the AMIs. This worked for me.
Get the install 4.14 version:
$ yum list kernel
Installed Packages
kernel.x86_64 4.14.219-164.354.amzn2 installed
kernel.x86_64 5.4.95-42.163.amzn2 @amzn2extra-kernel-5.4
Set the default kernel and verify:
# Update kernel version to match the above result
$ sudo grubby --set-default /boot/vmlinuz-4.14.219-164.354.amzn2.x86_64
$ sudo grubby --default-kernel
/boot/vmlinuz-4.14.219-164.354.amzn2.x86_64
Reboot:
sudo reboot
Still see this error with Kernel, any update ?
Linux ip-10-1-0-112.ec2.internal 5.4.110-54.182.amzn2.x86_64 #1 SMP Fri Apr 9 17:56:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Sorry for the delays. The AmazonLinux team is still actively working on this. I will post here as soon as I have word that it's fixed.
Most helpful comment
Sorry for the delays. The AmazonLinux team is still actively working on this. I will post here as soon as I have word that it's fixed.