-
Notifications
You must be signed in to change notification settings - Fork 706
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
service_nftables_disabled fails after remediation #10424
Comments
It passes using AutoMatus:
So I will take a look what will happen in the context of the whole profile. |
I haven't reproduced this in a RHEL 8.8 VM. The rule is |
Same here @jan-cerny . Yesterday I also executed few profile tests locally and couldn't reproduce it. I also tested a systems with the nftables service disabled during the rule implementation and it worked fine. I am investigating the service to see if any details is missed. |
I suspect that the state might be changed during the reboot, I'm trying it |
In this productization test there is a reboot and a scan is performed both before and after reboot. Before the reboot the service is masked but after the reboot the service is unmasked. I have tried to reproduce it locally on a virtual machine and on various remote machines, but I wasn't able to reproduce it outside the specific environment that is used during the productization, which prevents me from debugging it. I suspect that it can be something specific to the infrastructure. For the time being let's keep the issue opened and observe the result of the next week productization test. Then, we might solve it by adding a (temporary) waiver. |
This is still an issue in the latest run. |
I'm going to revisit this issue this week. |
Sanity/machine-hardening test is one of those where it fails. If you want, I can fairly quickly get you a machine where the test was run and the rule fails. The issue doesn't seem to be environment problem. It fails also in kickstart test. Kickstart test installs VM, hardens it via Anaconda addon, and performs VM scan after its first boot. No beakerlib, no workarounds (except few rule unselects so it's accessible), basically freshly installed RHEL. |
I wasn't able to reproduce this. You can ping me off-list to get some details about my machines. I'm honestly giving up. |
It would be great if you can provide me access for this machine Milan. |
Thanks for the efforts @jan-cerny . You provided value information with your tests. I will try to continue the investigation in this issue. |
This still happens as of this week. |
@marcusburghardt I haven't done any further investigation, if there's service dependency, if there's more problematic rules in CIS (and |
@mildas I didn't find any relationship between Something weird is that the first scan should not pass. It seems by any reason the first scan is unable to properly assess the systemd units: So, the remediation is not applied. This second scan is correct and it is failing because the Do you have any idea on why the |
I haven't found anything obvious, services doesn't reveal anything, and oscap devel log didn't help me either why it doesn't see it on first scan. @jan-cerny Could you look into it? Or should we report it against openscap project? See last 2 message, but basically openscap doesn't see that |
I can reproduce the situation that @marcusburghardt described, ie. the situation that I have found that reason is that However, even systemd doesn't show this unit. This gives no output:
Also, this doesn't give any output:
OTOH the status can be displayed
I guess that this is some specific behavior of systemd/dbus that I don't understand. |
@jan-cerny , in your test environment, could you try to execute the |
Thanks! I will try it. |
The result is that |
Ok. Thank you very much for this test @jan-cerny . I was considering we might have an option to workaround this issue without a reboot, but it doesn't seem to be the case. |
@mildas and @jan-cerny , would you agree to move this issue to the scanner and waive this rule on content side? |
@marcusburghardt This doesn't seem to be an issue on the content side. However, I'm not sure if it's an issue in the scanner. I don't know where the issue exactly is. In OpenSCAP, we only perform a dbus call of the |
I see. It makes sense. So we need more investigation on this to make it clear the source of the problem. It sounds reasonable to keep this issue opened here. It is also clear to us the rule itself is working as expected, so we should be fine to waive this issue in productization tests while this issue is open. Is it ok for you @mildas ? |
Sure, I will update waivers. |
The
The most important part of it is |
When I call the method via D-Spy I get |
This issue is not content related, but something related to D-BUS and systemd. @evgenyz, would you like to investigate if we can fix this on the scanner side? |
Could you create BZ either to openscap or dbus and close this issue? @evgenyz or @marcusburghardt |
We need to retest this using the openscap that contains the fix OpenSCAP/openscap#1980 |
The OpenSCAP fix has been released, this should be reviewed. |
This seems to fixed now. Closing. |
Description of problem:
This rule was introduced by #10390.
It is failing after remediation when checking
CIS Server Level 2
profile.SCAP Security Guide Version:
master branch as of 2023-04-01
Operating System Version:
RHEL8.8 and RHEL9.2
Steps to Reproduce:
Actual Results:
xccdf_org.ssgproject.content_rule_service_nftables_disabled - fail
Expected Results:
xccdf_org.ssgproject.content_rule_service_nftables_disabled - pass
Additional Information/Debugging Steps:
The text was updated successfully, but these errors were encountered: