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 2109485 - Potential invalid scan results in OpenSCAP
Summary: Potential invalid scan results in OpenSCAP
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openscap
Version: 9.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: Matus Marhefka
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks: 2111040 2111041
TreeView+ depends on / blocked
 
Reported: 2022-07-21 11:23 UTC by Jan Černý
Modified: 2023-03-20 11:21 UTC (History)
5 users (show)

Fixed In Version: openscap-1.3.6-4.el9
Doc Type: Bug Fix
Doc Text:
.OpenSCAP no longer produces incorrect errors when checking available memory Previously, when evaluating some XCCDF rules, OpenSCAP incorrectly showed the error message `Failed to check available memory` and produced invalid scan results. For example, this occurred for rules `accounts_user_dot_no_world_writable_programs`, `accounts_user_dot_group_ownership`, and `accounts_users_home_files_permissions`. With this update, the bug in error handling is fixed and the error message appears only for real failures.
Clone Of:
: 2111040 2111041 (view as bug list)
Environment:
Last Closed: 2022-11-15 10:37:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
RHEL 9 data stream (806.12 KB, application/x-bzip)
2022-07-21 11:23 UTC, Jan Černý
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-128602 0 None None None 2022-07-21 11:29:57 UTC
Red Hat Product Errata RHBA-2022:8216 0 None None None 2022-11-15 10:37:49 UTC

Description Jan Černý 2022-07-21 11:23:46 UTC
Created attachment 1898451 [details]
RHEL 9 data stream

Description of problem:
Evaluating certain rules trigger an error message "Failed to check available memory" in OpenSCAP.

Version-Release number of selected component (if applicable):
openscap-1.3.6-3.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1. Build RHEL9 content from upstream https://github.com/ComplianceAsCode/content/ as of HEAD 169b4e8cb5b331aef65375214de2920b3fde6619 (2022-07-21) or download the attachment of this BZ
2. Make sure there is enough word-writable files on your system, or create them artificially:
for x in $(seq 1000) ; do touch file$x; chmod o+w file$x ; done
3. Run scan
sudo oscap xccdf eval --profile 'stig' --rule xccdf_org.ssgproject.content_rule_accounts_user_dot_no_world_writable_programs --results-arf arf.xml ./ssg-rhel9-ds.xml

Actual results:
E: oscap:       Failed to check available memory

Expected results:
no error

Additional info:
- other rules can also trigger this error message, eg. accounts_user_dot_group_ownership, accounts_users_home_files_permissions
- the scanner doesn't crash, but validity of produced results is questionable
- also tracked in upstream in https://github.com/OpenSCAP/openscap/issues/1867

Comment 1 Jan Černý 2022-07-21 11:34:26 UTC
Analysis:

Comment 3 Jan Černý 2022-07-21 11:47:15 UTC
This has been fixed upstream in https://github.com/OpenSCAP/openscap/pull/1861

Comment 4 Jan Černý 2022-07-22 15:04:45 UTC
We can use unit test proposed in https://github.com/OpenSCAP/openscap/pull/1874/ for testing.

Comment 6 Jan Černý 2022-07-26 08:28:48 UTC
There are also additional occurrences of not resetting errno to 0 before strtol() in the OpenSCAP code base and we are going to fix these in https://github.com/OpenSCAP/openscap/pull/1875.

Comment 17 errata-xmlrpc 2022-11-15 10:37:46 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 (openscap 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-2022:8216


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