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

Rule firewalld_sshd_port_enabled fails after kickstart installation #12276

Open
jan-cerny opened this issue Aug 7, 2024 · 0 comments
Open

Rule firewalld_sshd_port_enabled fails after kickstart installation #12276

jan-cerny opened this issue Aug 7, 2024 · 0 comments

Comments

@jan-cerny
Copy link
Collaborator

jan-cerny commented Aug 7, 2024

Description of problem:

Rule firewalld_sshd_port_enabled fails after kickstart installation of RHEL 9.4 with STIG profile and various other profiles.

First problem is that the rule doesn't have a kickstart remediation. This can be easily fixed by creating the kickstart remediation with the following file contents:

# platform = multi_platform_all
# reboot = false
# complexity = low
# strategy = configure
# disruption = low

firewall enable ssh

However, adding the kickstart remediation won't make the rule passing. I have experimentally verified that it won't.

The core problem is that the rule checks that all network interfaces have a zone set to public. The Bash remediation should set that. But, during the installation, the environment is probably different or the Bash remediation isn't executed because it checks if the services are run.

if test "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)"; then
...
if systemctl is-active NetworkManager && systemctl is-active firewalld; then

SCAP Security Guide Version:

current upstream master branch as of 2024-08-07 as of HEAD 42c8206

Operating System Version:

RHEL 9.4

Steps to Reproduce:

  1. build rhel9
  2. generate kickstart using oscap xccdf generate fix --fix-type kickstart (using openscap-1.4.0)
  3. use the generated kickstart for operating system installation of RHEL 9.4
  4. on the installed machine run oscap xccdf eval --profile stig --results-arf arf.xml /usr/share/xml/scap/ssg-rhel9-ds.xml.

Actual Results:

firewalld_sshd_port_enabled: fail

Expected Results:

firewalld_sshd_port_enabled: pass

Additional Information/Debugging Steps:

The remediation report contains this output of the remediation:

Running in chroot, ignoring command 'is-active'
Running in chroot, ignoring command 'is-active'
FirewallD is not running
Running in chroot, ignoring command 'restart'
FirewallD is not running
FirewallD is not running
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant