-
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
Rule bios_enable_execution_restrictions is reporting error #9901
Comments
We've already met the error in CentOS Stream 8 images and our Github actions are waiving it - https://src.fedoraproject.org/tests/scap-security-guide/blob/main/f/Sanity/machine-hardening/runtest.sh#_89 It's common in CS8 images, but doesn't appear in every run. |
What exactly is the problem? Is it that |
Yes, exactly. An example CentOS Stream 8 log. Search for |
It appeared again in master as of 2022-12-17. |
So, what is this non-utf-8 sequence, and where does it come from (what subsystem generates it)? Just to be clear here on terms: there is no such thing as non-utf-8 character per se, there are invalid sequences of bytes in utf-8 encoded byte-streams. AKA broken utf-8 strings (improperly encoded, improperly copied etc). |
I mean having the whole dmesg log output as the error message is quite unhelpful, I don't want to waste time looking for specific line if somebody already know where the problem is exactly. |
On the other hand, what makes us think that dmesg has its lines encoded in UTF-8? I was sure that it is ASCII, but ATM I can't find any supporting information for either of statements. |
We have discovered that the /var/log/messages can contain binary data. That means that our assumption to use textfilecontent54_test isn't correct, the approach of using textfilecontent54_probe might fail sometimes. OVAL doesn't allow to tell to the scanner which encoding to expect. Also, we can't set the expected behavior of the probe in case of encoding error. In the current implementation, OpenSCAP errors when pcre_exec() fails, because that situation means OpenSCAP can't determine if the string is present in the scanned file and if we would instead ignore the error silently we get false negative rule results for some rules. But, actually, depending on the rule objective, the content authors might sometimes want a different behavior for some other rules. Possible solutions are:
|
@marcusburghardt @vojtapolasek @evgenyz What do you think about the idea of removing the criterion |
@comps WDYT? You have a very deep insight into compliance checking in practice, and the check in question is quite simple: https://github.com/ComplianceAsCode/content/blob/master/linux_os/guide/system/permissions/restrictions/enable_nx/bios_enable_execution_restrictions/oval/shared.xml |
I personally don't know a way to disable Therefore, for the scope of this rule, I believe it is fine to remove the |
So after a chat witj @comps, we came to the conclusion that removal of that |
Description of problem:
The
bios_enable_execution_restrictions
rule is reporting error when remediating a RHEL8 system using STIG Delta Tailoring.SCAP Security Guide Version:
master as of 2022-11-26
Operating System Version:
RHEL8.7
Steps to Reproduce:
Actual Results:
xccdf_org.ssgproject.content_rule_bios_enable_execution_restrictions:error
Expected Results:
No error in
bios_enable_execution_restrictions
ruleAdditional Information/Debugging Steps:
create_scap_delta_tailoring.py
script can be used to create a delta tailoring file.The text was updated successfully, but these errors were encountered: