This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2183207 - Images built with stig profile remediation fail to boot with FIPS error
Summary: Images built with stig profile remediation fail to boot with FIPS error
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: osbuild-composer
Version: 8.7
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Image Builder team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-30 15:02 UTC by Lark Gordon
Modified: 2023-09-18 13:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-18 13:53:01 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-4649 0 None Migrated None 2023-09-18 13:50:20 UTC
Red Hat Issue Tracker RHELPLAN-153625 0 None None None 2023-03-30 15:03:46 UTC

Internal Links: 2185868

Description Lark Gordon 2023-03-30 15:02:38 UTC
Created attachment 1954709 [details]
blueprint used

Description of problem:
Images built with composer/image builder fail to boot with an error: 

Warning: /boot//.vmlinuz-<kernel version>.x86_64.hmac does not exist
FATAL: FIPS integrity test failed
Refusing to continue

Version-Release number of selected component (if applicable):

osbuild-composer-core-62-3.el8_7.x86_64
osbuild-composer-dnf-json-62-3.el8_7.x86_64
osbuild-composer-worker-62-3.el8_7.x86_64
cockpit-composer-41-1.el8.noarch
osbuild-composer-62-3.el8_7.x86_64
genisoimage-1.1.11-39.el8.x86_64

How reproducible:
Every time an image is built with xccdf_org.ssgproject.content_profile_stig profile

Steps to Reproduce:
1. Create a blueprint with the following: 

[customizations.openscap]
datastream = "/usr/share/xml/scap/ssg/content/ssg-rhel8-ds-1.2.xml"
profile_id = "xccdf_org.ssgproject.content_profile_stig"

2. Build the image (tested with both qcow2 and vmdk)

3. Boot the image

Actual results:
System fails to boot with an error that the .hmac for the kernel does not exist

Expected results:
The system should boot

Additional info:
I've tested with and without a scap user and got the same results: 

[[customizations.user]]
name = "scap-security-guide"
description = "Admin account"
password = "hash"
home = "/home/scap-security-guide"
group = ["wheel"]

I booted the system from an ISO and confirmed that the .hmac file does exist, as does the scap user. However the scap user is not part of the wheel group, not sure why or if that's relevant to the issue.

System boots fine if FIPS is disabled.

Manually enabling FIPS after installation with "fips-mode-setup --enable" works fine. 

Since the error message says the system is looking for an hmac at /boot//.vmlinuz, I'm wondering if this is an issue with the path it's using?

Comment 4 hasibul.haque@hotmail.com 2023-05-17 23:00:44 UTC
I have the same issue. Either of these customizations causes the image rendered unbootable.

[customizations.kernel] 
append = "fips=1"

[customizations.openscap]
datastream = "/usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml"
profile_id = "xccdf_org.ssgproject.content_profile_stig"



Boot error:

[    9.190130] GPT: Use GNU Parted to correct GPT errors.
[    9.193832]  xvda: xvda1 xvda2 xvda3
[    9.692694] dracut: Scanning devices xvda2  for LVM volume groups 
[    9.772169] dracut: WARNING: locking_type (4) is deprecated, using --sysinit --readonly.
[    9.781534] dracut: Found volume group "rootvg" using metadata type lvm2
[    9.873230] dracut: WARNING: locking_type (4) is deprecated, using --sysinit --readonly.
[    9.880888] dracut: Allowing activation with --readonly --sysinit.
[   10.614354] dracut: 3 logical volume(s) in volume group "rootvg" now active
[   10.970638] SGI XFS with ACLs, security attributes, quota, no debug enabled
[   10.984423] XFS (dm-0): Mounting V5 Filesystem
[   12.066757] XFS (dm-0): Ending clean mount
[   12.303164] dracut: Remounting /dev/disk/by-uuid/5f81dff6-56a8-4249-b4bc-d4ee16789136 with -o defaults
[   12.734329] dracut: Mounted root filesystem /dev/mapper/rootvg-rootlv
[   12.754858] dracut: Checking integrity of kernel
[   12.766024] dracut Warning: /boot//.vmlinuz-4.18.0-477.10.1.el8_8.x86_64.hmac does not exist
dracut Warning: [   12.775482] dracut: FATAL: FIPS integrity test failed
/boot//.vmlinuz-[   12.782589] dracut: Refusing to continue
4.18.0-477.10.1.el8_8.x86_64.hmac does not exist


[   12.792898] dracut Warning: Signal caught!



[   12.804047] dracut Warning: dracut: FATAL: FIPS integrity test failed
[   12.804143] dracut Warning: dracut: Refusing to continue
dracut Warning: Signal caught!



dracut Warning: dracut: FATAL: FIPS integrity test failed

dracut Warning: dracut: Refusing to continue

%G%Gdracut Warning: /boot//.vmlinuz-4.18.0-477.10.1.el8_8.x86_64.hmac does not exist





dracut Warning: Signal caught!



dracut Warning: dracut: FATAL: FIPS integrity test failed

dracut Warning: dracut: Refusing to continue


Generating "/run/initramfs/rdsosreport.txt"
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

To get more debug information in the report,
reboot with "rd.debug" added to the kernel command line.

Dropping to debug shell.

dracut:/#

Comment 5 Gianluca 2023-09-11 11:30:51 UTC
Hi, to follow up on this.

unfortunately, fips mode isn't supported by image-builder at present. You can add the kernel parameter to enable it manually, but the issue is that the `/boot` directory is on a different partition.
So overall, this would be a feature request.

We had a similar issue and discussion upstream with the OpenSCAP team and their blueprint generation tool [1]. There is an upstream issue for this as the OpenSCAP team was configuring the kernel parameter in the blueprint generation but, 
ultimately, they disabled the fips rule group.

[1] https://github.com/ComplianceAsCode/content/issues/9559

Comment 7 RHEL Program Management 2023-09-18 13:47:56 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 8 RHEL Program Management 2023-09-18 13:53:01 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.