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 2172555 - Check of network interfaces assignment in Firewalld zones fails when upgrading RHEL8 to RHEL9
Summary: Check of network interfaces assignment in Firewalld zones fails when upgradin...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: scap-security-guide
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Marcus Burghardt
QA Contact: Milan Lysonek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-22 14:15 UTC by Marcus Burghardt
Modified: 2023-11-07 10:07 UTC (History)
7 users (show)

Fixed In Version: scap-security-guide-0.1.69-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:37:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-149677 0 None None None 2023-02-22 14:26:34 UTC
Red Hat Product Errata RHBA-2023:6552 0 None None None 2023-11-07 08:37:35 UTC

Description Marcus Burghardt 2023-02-22 14:15:06 UTC
Description of problem:

The firewalld_sshd_port_enabled rule was recently refactored[1] to ensure the SSH access is properly enabled in alignment to NetworkManager and Firewalld standards.

Part of the rule check is to ensure that all existing NICs are assigned to a Firewalld zone. This is accomplished by checking the NIC configuration files.

In RHEL8 the NIC settings are stored by default in "/etc/sysconfig/network-scripts". In RHEL9 the NIC settings are stored by default in "/etc/NetworkManager/system-connections". The check is consistent with this, looking in different directories according to the RHEL version.

For compatibility purposes, NetworkManager can work with both directories depending on how the NetworkManager plugins are defined in NetworkManager.conf file.

Therefore, in case a NIC is configured in both directories, one will have precedence over the other according to the order they are defined. This makes it hard to ensure the correct file is properly configured.

The issue in this BZ is specific for a scenario where the RHEL8, which uses ifcfg files, is upgraded to a RHEL9, which prefers NetworkManager keyfiles. During the upgrade, the ifcfg files are not migrated to keyfiles and this causes a false negative during the check because the check expects to find the keyfiles in a RHEL9 system.

- [1] https://github.com/ComplianceAsCode/content/pull/9712

Version-Release number of selected component (if applicable):
RHEL9
scap-security-guide-0.1.66

How reproducible:
Always

Steps to Reproduce:
1. Install a clean RHEL8 system
2. Upgrade the RHEL8 system to RHEL9
3. Scan the system for the firewalld_sshd_port_enabled rule, choosing to remediate if necessary:
4. oscap xccdf eval --remediate --profile stig --rule xccdf_org.ssgproject.content_rule_firewalld_sshd_port_enabled /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml

Actual results:
The scan after remediation fail.

Expected results:
The scan after remediation pass.

Additional info:

The initial scan will report fail because the expected NetworkManager keyfile is not found in RHEL9, then the remediation will be executed and the ifcfg file will be properly fixed honoring existing ifcfg file.
However, the scan after the remediation will return error because the keyfile was not found.

There is a NetworkManager command used to migrate legacy ifcfg files to keyfile format:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_and_managing_networking/assembly_manually-creating-networkmanager-profiles-in-keyfile-format_configuring-and-managing-networking#proc_migrating-networkmanager-profiles-from-ifcfg-to-keyfile-format_assembly_manually-creating-networkmanager-profiles-in-keyfile-format

However, this migration is not automatic during the system Upgrade neither during the remediation. On the remediation side, although recommended the migration to keyfile format in RHEL9, it is intentional to preserve desired standards defined by the administrators.

Comment 3 Jan Černý 2023-06-14 13:55:51 UTC
the https://github.com/ComplianceAsCode/content/pull/10330 has been merged upstream

Comment 13 errata-xmlrpc 2023-11-07 08:37:02 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 (scap-security-guide bug fix and enhancement update), 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-2023:6552


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