Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grub2_enable_fips_mode prose guidance causes boot fail on an EFI system #2248

Closed
GaryGapinski opened this issue Aug 14, 2017 · 6 comments · Fixed by #5580
Closed

grub2_enable_fips_mode prose guidance causes boot fail on an EFI system #2248

GaryGapinski opened this issue Aug 14, 2017 · 6 comments · Fixed by #5580
Labels
Bash Bash remediation update. bugfix Fixes to reported bugs.
Milestone

Comments

@GaryGapinski
Copy link

(Tested on RHEL 7.4.)

The guidance lacks an additional grub.cfg argument identifying the rootfs location.

The guidance in https://access.redhat.com/solutions/137833 has been tested and found to work properly. If that guidance is determined to be doctrinally correct, it should be stolen for SSG.

Separately and additionally, the OVAL test for FIPS mode dfoes not actually determine if FIPS mode is in effect. It should be augmented (or replaced) with a sysctl test for crypto.fips_enabled = 1.

@redhatrises redhatrises added this to the 0.1.36 milestone Oct 9, 2017
@redhatrises redhatrises added the bugfix Fixes to reported bugs. label Oct 9, 2017
@redhatrises redhatrises modified the milestones: 0.1.36, 0.1.37 Oct 31, 2017
@yuumasato yuumasato modified the milestones: 0.1.37, 0.1.38 Jan 3, 2018
@yuumasato yuumasato modified the milestones: 0.1.38, 0.1.39 Mar 2, 2018
@yuumasato yuumasato modified the milestones: 0.1.39, 0.1.40 May 2, 2018
@matejak
Copy link
Member

matejak commented Jul 19, 2018

You probably mean this rule: https://github.com/OpenSCAP/scap-security-guide/blob/master/linux_os/guide/system/software/integrity/fips/grub2_enable_fips_mode.rule
Could you be more specific what is the main cause of trouble, or even better, be inspired by our guide and come up with a pull request?

@matejak matejak modified the milestones: 0.1.40, 0.1.41 Jul 19, 2018
@angystardust
Copy link
Contributor

Hi @matejak I experienced the same issue described by @GaryGapinski on an AWS RHEL7.5 instance.
After enabling FIPS though oscap remediation scripts, my instance was no longer booting.
Here is the description and the solution to the issue: http://blog.kwnetapps.com/aws-centos-7-fips-mode/

@redhatrises
Copy link
Contributor

It's a little funny that centos is used here considering it is not FedRAMP or FIPS certified.

@angystardust
Copy link
Contributor

@redhatrises you're right: in the blog post the guy talks about a CentOS setup but I can tell you that the same issue happens also on a genuine RHEL

@yuumasato yuumasato modified the milestones: 0.1.41, 0.1.42 Oct 1, 2018
@yuumasato yuumasato modified the milestones: 0.1.42, 0.1.43 Dec 11, 2018
@yuumasato yuumasato modified the milestones: 0.1.43, 0.1.44 Feb 21, 2019
@matejak matejak added the Bash Bash remediation update. label Mar 21, 2019
@matejak
Copy link
Member

matejak commented Mar 21, 2019

Relates to #3136

@yuumasato yuumasato modified the milestones: 0.1.44, 0.1.45 May 3, 2019
@yuumasato yuumasato modified the milestones: 0.1.45, 0.1.46 Jul 22, 2019
@yuumasato yuumasato removed this from the 0.1.46 milestone Sep 2, 2019
@yuumasato yuumasato added this to the 0.1.47 milestone Sep 2, 2019
@mrabe142
Copy link

mrabe142 commented Nov 1, 2019

Hello,

I also ran into a very similar issue today (same boot failure but not using EFI). I deployed the latest official Amazon AWS RHEL 7.7 AMI. I installed the latest OpenSCAP (1.2.17-1) and latest SSG (0.1.45-1). After I ran the OpenSCAP online remediation and rebooted, the AMI would not boot anymore (goes from pending to stopped). It had "dracut: FATAL: FIPS integrity test failed" in the bootup log.

I found that same CentOS blog which put be on the right track. It appears that the remediation is always adding the "boot=" after the "fips=1" in the kernel boot command. From my understanding, you are only supposed to add the "boot=" portion IF "/boot" resides on a different partition/disk. Both the STIG guidance and the Red Hat guidance (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations) both state you only add that if there is a separate partition. The image i was using only had a single / partition so it did not meet that criteria.

After remaking the image, applying the OpenSCAP remediation but before rebooting, I edited the "/etc/default/grub" file and removed the "boot=" portion that was added but left the "fips=1". After rebuilding the grub config again, I rebooted and it came up as expected. I verified fips was enabled with the sysctl command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bash Bash remediation update. bugfix Fixes to reported bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants