Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2020556

Summary: The grub2* rules that promise to set kernel command-line parameters do not work
Product: Red Hat Enterprise Linux 9 Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: scap-security-guideAssignee: Watson Yuuma Sato <wsato>
Status: CLOSED ERRATA QA Contact: Milan Lysonek <mlysonek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: ggasparb, jpazdziora, matyc, mhaicman, mlysonek, vpolasek
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: scap-security-guide-0.1.60-1.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 13:53:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Pazdziora (Red Hat) 2021-11-05 09:35:26 UTC
Description of problem:

There are multiple grub2_* rules in the OSPP SCAP profile which promise to set kernel command-line parameters on EFI systems. However, they use the grub2_bootloader_argument template which uses grub2-editenv to set kernelopts in /boot/grub/grubenv. However, that value is not used because /boot/loader/entries/*.conf do not reference $kernelopts.

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

scap-security-guide-0.1.57-5.el9.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. oscap xccdf eval --remediate --profile xccdf_org.ssgproject.content_profile_ospp /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
2. reboot
4. cat /proc/cmdline
3. grep audit=1 /proc/cmdline

Actual results:

The oscap command reports among others

Title	Enable Auditing for Processes Which Start Prior to the Audit Daemon
Rule	xccdf_org.ssgproject.content_rule_grub2_audit_argument
Ident	CCE-83651-0
Result	fixed

The can command shows

BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-11.el9.x86_64 root=/dev/mapper/rhel_machine-root ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel_machine-swap rd.lvm.lv=rhel_machine/root rd.lvm.lv=rhel_machine/swap console=ttyS0,115200 fips=1 boot=UUID=01e76343-2ca2-4ded-92df-5d5536feb60f

The grep command does not find anything.

Expected results:

The grub2* rules use such mechanism that after reboot, kernel reports that it got the arguments promised.

Additional info:

Comment 1 Jan Pazdziora (Red Hat) 2021-11-05 09:39:43 UTC
While it is true that the switch to grub2-editenv was documented for RHEL 8 in https://access.redhat.com/solutions/3710121 and https://access.redhat.com/solutions/6383141, based on bug 1926715 comment 3 there is another change on the horizon for RHEL 9.

Looking at RHEL 8 documentation at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/configuring-kernel-command-line-parameters_managing-monitoring-and-updating-the-kernel, the grubby --update-kernel=ALL approach should be working on RHEL 8 already.

Comment 2 Jan Pazdziora (Red Hat) 2021-11-05 09:48:11 UTC
This is a regression against RHEL 8 with scap-security-guide-0.1.54-5.el8.

Comment 4 Jan Pazdziora (Red Hat) 2021-11-05 12:30:35 UTC
In this bugzilla we focus on the semantic correctness of the rules.

Please be also aware of bug 2020623 where we focus on the consistency of the descriptions, warnings, and the OVAL checks and remediate.

Ideally all the rules that attempt to set kernel CLI parameters would do it exactly the same way, on any given OS version.

Comment 8 Vojtech Polasek 2022-01-12 08:08:01 UTC
Fixed upstream:
https://github.com/ComplianceAsCode/content/pull/7931

Comment 20 errata-xmlrpc 2022-05-17 13:53:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: scap-security-guide), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2610