Bug 2161499
| Summary: | Insights compliance command fails with scan failed error | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Nikhil Gupta <ngupta> |
| Component: | openscap | Assignee: | Evgeny Kolesnikov <ekolesni> |
| Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
| Severity: | high | Docs Contact: | Petr Hybl <phybl> |
| Priority: | unspecified | ||
| Version: | 8.6 | CC: | ahumbe, bblasco, ekolesni, gfialova, jafiala, jcerny, mhaicman, mmarhefk, phybl |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Known Issue | |
| Doc Text: |
.OpenSCAP memory-consumption problems
On systems with limited memory, the OpenSCAP scanner might stop prematurely or it might not generate the results files. To work around this problem, you can customize the scanning profile to deselect rules that involve recursion over the entire `/` file system:
* `rpm_verify_hashes`
* `rpm_verify_permissions`
* `rpm_verify_ownership`
* `file_permissions_unauthorized_world_writable`
* `no_files_unowned_by_user`
* `dir_perms_world_writable_system_owned`
* `file_permissions_unauthorized_suid`
* `file_permissions_unauthorized_sgid`
* `file_permissions_ungroupowned`
* `dir_perms_world_writable_sticky_bits`
For more details and more workarounds, see the related link:https://access.redhat.com/articles/6999111[Knowledgebase article].
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-03-27 08:56:34 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
Nikhil Gupta
2023-01-17 06:14:16 UTC
oscap --verbose DEVEL xccdf eval --profile cis_server_l1 --report cis_server_l1.html /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml
and after an hour or more it got me this:
==========================================================
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
Killed
[root@dmzgrg06 ~]#
===========================================================
I did not kill it, something inside did it.
Scrolling up, I get the error here:
=================================================
D: oscap: Signaling `notfull' [oscap(1916230):icache_worker(7f79f6ffd700):icache.c:241:probe_icache_worker]
D: oscap: Handling NOP [oscap(1916230):icache_worker(7f79f6ffd700):icache.c:265:probe_icache_worker]
D: oscap: Sync [oscap(1916230):probe_worker(7f78e47f0700):icache.c:477:probe_icache_nop]
D: oscap: old flag: 0, new flag: 2. [oscap(1916230):probe_worker(7f78e47f0700):probe-api.c:688:probe_cobj_set_flag]
D: oscap: handler result = 0x7f79e8030ba0, return code = 0 [oscap(1916230):probe_worker(7f78e47f0700):worker.c:99:probe_worker_runfn]
D: oscap: probe thread deleted [oscap(1916230):probe_worker(7f78e47f0700):worker.c:119:probe_worker_runfn]
D: oscap: Sorting blocks & building iterator array [oscap(1916230):probe_worker(7f78e47f0700):sexp-manip.c:1408:SEXP_list_sort]
D: oscap: Iterator count = 1 [oscap(1916230):probe_worker(7f78e47f0700):sexp-manip.c:1442:SEXP_list_sort]
D: oscap: cnt = 0 [oscap(1916230):probe_worker(7f78e47f0700):seap-message.c:138:SEAP_msgattr_exists]
D: oscap: no-reply not set: sending full reply [oscap(1916230):probe_worker(7f78e47f0700):seap.c:481:SEAP_reply]
D: oscap: MSG -> SEXP [oscap(1916230):probe_worker(7f78e47f0700):seap-packet.c:260:SEAP_packet_msg2sexp]
D: oscap: ("seap.msg" ":id" 29 ":reply-id" 29 (2 () ((("linux:rpminfo_item" ":id" "11916230751678" ) ("name" "xorg-x11-server-common" ) ("arch" "x86_64" ) ("epoch" "(none)" ) ("release" "9.el8" ) ("version" "1.20.11" ) [evr_string]("evr" "0:1.20.11-9.el8" ) ("signature_keyid" "199e2f91fd431d51" ) ("extended_name" "xorg-x11-server-common-0:1.20.11-9.el8.x86_64" ) ) ) () ) ) [oscap(1916230):probe_worker(7f78e47f0700):seap-packet.c:261:SEAP_packet_msg2sexp]
D: oscap: packet size: 2076 [oscap(1916230):probe_worker(7f78e47f0700):seap-packet.c:262:SEAP_packet_msg2sexp]
D: oscap: name=reply-id, value=0x7f79e8033550 [oscap(1916230):probe_worker(7f78e47f0700):seap-message.c:73:SEAP_msg_free]
D: oscap: probe_worker_runfn has finished [oscap(1916230):probe_worker(7f78e47f0700):worker.c:179:probe_worker_runfn]
D: oscap: Received packet [oscap(1916230):oscap(7f7a64d5d0c0):seap-packet.c:794:SEAP_packet_recv]
D: oscap: ("seap.msg" ":id" 29 ":reply-id" 29 (2 () ((("linux:rpminfo_item" ":id" "11916230751678" ) ("name" "xorg-x11-server-common" ) ("arch" "x86_64" ) ("epoch" "(none)" ) ("release" "9.el8" ) ("version" "1.20.11" ) [evr_string]("evr" "0:1.20.11-9.el8" ) ("signature_keyid" "199e2f91fd431d51" ) ("extended_name" "xorg-x11-server-common-0:1.20.11-9.el8.x86_64" ) ) ) () ) ) [oscap(1916230):oscap(7f7a64d5d0c0):seap-packet.c:795:SEAP_packet_recv]
D: oscap: packet size: 2076 [oscap(1916230):oscap(7f7a64d5d0c0):seap-packet.c:796:SEAP_packet_recv]
D: oscap: Message received. [oscap(1916230):oscap(7f7a64d5d0c0):oval_probe_ext.c:579:oval_probe_comm]
D: oscap: name=(null), value=0x7f79e80363c0 [oscap(1916230):oscap(7f7a64d5d0c0):seap-message.c:73:SEAP_msg_free]
D: oscap: Syschar entry type: 9003 'linux' => decoded OK [oscap(1916230):oscap(7f7a64d5d0c0):oval_sexp.c:982:oval_sexp_to_sysitem]
I: oscap: Test 'oval:ssg-test_package_xorg-x11-server-common_removed:tst:1' requires that none of the objects defined by 'oval:ssg-obj_test_package_xorg-x11-server-common_removed:obj:1' exist on the system. [oscap(1916230):oscap(7f7a64d5d0c0):oval_resultTest.c:909:_oval_result_test_evaluate_items]
I: oscap: 1 objects defined by 'oval:ssg-obj_test_package_xorg-x11-server-common_removed:obj:1' exist on the system. [oscap(1916230):oscap(7f7a64d5d0c0):oval_resultTest.c:918:_oval_result_test_evaluate_items]
I: oscap: Test 'oval:ssg-test_package_xorg-x11-server-common_removed:tst:1' does not contain any state to compare object with. [oscap(1916230):oscap(7f7a64d5d0c0):oval_resultTest.c:920:_oval_result_test_evaluate_items]
I: oscap: All items matching object 'oval:ssg-obj_test_package_xorg-x11-server-common_removed:obj:1' were collected. (flag=complete) [oscap(1916230):oscap(7f7a64d5d0c0):oval_resultTest.c:963:_oval_result_test_evaluate_items]
I: oscap: Test 'oval:ssg-test_package_xorg-x11-server-common_removed:tst:1' evaluated as false. [oscap(1916230):oscap(7f7a64d5d0c0):oval_resultTest.c:1164:oval_result_test_eval]
I: oscap: Definition 'oval:ssg-package_xorg-x11-server-common_removed:def:1' evaluated as false. [oscap(1916230):oscap(7f7a64d5d0c0):oval_resultDefinition.c:170:oval_result_definition_eval]
Result fail
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
D: oscap: rbt_str_add: non-zero return code [oscap(1916230):oscap(7f7a64d5d0c0):oval_string_map.c:211:oval_string_map_put]
Our preliminary investigation result: the OOM situation could be caused by one of the rules that traverse filesystems looking for invalid rights/ownership. The suspects are: - file_permissions_unauthorized_world_writable - no_files_unowned_by_user - file_permissions_ungroupowned In order to confirm if this is the case one can either: - execute oscap --verbose DEVEL xccdf eval --profile cis_server_l1 --skip-rule file_permissions_unauthorized_world_writable --skip-rule no_files_unowned_by_user --skip-rule file_permissions_ungroupowned --report cis_server_l1.html /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml, effectively excluding these rules from the scan - or temporarily unmount /u01 during the scan The workaround for the problem is to exclude all offending rules from the scan using a tailoring file. *** Bug 2147604 has been marked as a duplicate of this bug. *** This bug boils down to the outstanding memory problems of OpenSCAP which are covered by the KBS https://access.redhat.com/articles/6999111 and that are unlikely to be fixed. |