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 1584947 - on UEFI systems, Improper grub2-pc RPM spec file causing NIST(SSG) SCAP policy failure
Summary: on UEFI systems, Improper grub2-pc RPM spec file causing NIST(SSG) SCAP polic...
Keywords:
Status: CLOSED DUPLICATE of bug 1496952
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: grub2
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Peter Jones
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-01 02:33 UTC by Miki Shapiro
Modified: 2018-06-29 18:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-29 18:19:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miki Shapiro 2018-06-01 02:33:03 UTC
Description of problem:

The SSG NIST policy has a rule ("xccdf_org.ssgproject.content_rule_rpm_verify_permissions") whose identifier is CCE_27209-6. 
This rule runs rpm -Va and fails if any files are marked with a capital letter M in the second field of the output, which indicates the file's filesystem permissions differ from what the RPM database believes they should be. 

One such file is /boot/efi/EFI/redhat which is owned by the grub2-pc package. 

/boot/efi is the EFI partition, which needs, in order to comply with the EFI standard, to be FAT. No POSIX filesystem permissions can be stored on it. 

As such, RPM packages should not deploy files to this filesystem, as any files RPM packages stored on such a filesystem will get registered in the RPM database, and subsequently fail SCAP policies (such as, in our case, but not limited to, NIST-171). 

I am unsure if there is a %files directive that excludes files from being registered in the RPM database (of the %doc, %config etc variety). 
If there is such a directive, it should be used for the above. If not, then files intended for the EFI filesystem should be deployed by the RPM %files spec section onto some other POSIX permissions capable filesystem (/tmp, /var, pick your poison), and copied over by the RPM %post, thus avoiding the SCAP pitfall, 

Note this is the only file on a @base install on a UEFI system that thus flags and fails a red (Severity: High) benchmark test.


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

How reproducible:
100%

Steps to Reproduce:
1. Install RHEL 7.5 on a UEFI system (for example, HyperV "gen2"(e.g. UEFI) VM, or any mac)
2. Remediate any files whose filesystem perms are not consistent with RPM database perms by running:
for file in `rpm -Va|grep '^.M|cut -c14-`; do rpm -qf $file; done|xargs rpm --setperms
3.run the SCAP security benchmark:
rpm -Va|grep '^.M

Actual results:
Output of step 3 above will be:
.M....... /boot/efi/EFI/redhat

Expected results:
Output of the above to be empty.

Additional info:
As above.

Comment 2 Peter Jones 2018-06-29 18:19:12 UTC

*** This bug has been marked as a duplicate of bug 1496952 ***


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