Amazon-eks-ami: FIPS Kernel Panic on v19 Kernel 5.4.x

Created on 10 Mar 2021  路  3Comments  路  Source: awslabs/amazon-eks-ami

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 Region: All
  • Instance Type(s): All
  • EKS Platform version (use aws eks describe-cluster --name <name> --query cluster.platformVersion): All
  • Kubernetes version (use aws eks describe-cluster --name <name> --query cluster.version): 1.19
  • AMI Version: ami-0d45bae218253b811
  • Kernel (e.g. uname -a): 5.4.95-42.163.amzn2 amzn2extra-kernel-5.4
  • Release information (run cat /etc/eks/release on a node):
kernel-issue

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.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dawidmalina picture dawidmalina  路  4Comments

ismailyenigul picture ismailyenigul  路  8Comments

tomweston picture tomweston  路  4Comments

cdenneen picture cdenneen  路  6Comments

altaurog picture altaurog  路  4Comments