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 2126883 - openscap errors when OVAL object component in a variable doesn't collect any data
Summary: openscap errors when OVAL object component in a variable doesn't collect any ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2023-02-13
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openscap
Version: 9.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: Matus Marhefka
URL:
Whiteboard:
Depends On: 2126882 2171824
Blocks: 2091421
TreeView+ depends on / blocked
 
Reported: 2022-09-14 16:24 UTC by Matus Marhefka
Modified: 2023-05-09 09:22 UTC (History)
6 users (show)

Fixed In Version: openscap-1.3.7-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 2126882
Environment:
Last Closed: 2023-05-09 07:52:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-133978 0 None None None 2022-09-14 16:33:44 UTC
Red Hat Product Errata RHBA-2023:2391 0 None None None 2023-05-09 07:53:01 UTC

Description Matus Marhefka 2022-09-14 16:24:02 UTC
+++ This bug was initially created as a clone of Bug #2126882 +++

Description of problem:
openscap prints error when evaluating oval:ssg-file_permissions_sshd_private_key:def:1 OVAL definition and openssh-server RPM is not installed on the filesystem (no ssh_keys in /etc/group).

Version-Release number of selected component (if applicable):
openscap-1.3.6-4.el9
scap-security-guide-0.1.63-5.el9.noarch


How reproducible:
always


Steps to Reproduce:
Create a minimal chroot filesystem:
# mkdir -p /chroot_dir/var/lib/rpm
# rpm --root /chroot_dir --initdb
# dnf -y --disablerepo=* --enablerepo=rhel --enablerepo=rhel-AppStream --installroot=/chroot_dir install redhat-release filesystem yum rpm bash coreutils util-linux

# oscap-chroot /chroot_dir oval eval --id oval:ssg-file_permissions_sshd_private_key:def:1 /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
E: oscap:     Failed to convert OVAL state to SEXP, id: oval:ssg-filter_ssh_key_owner_ssh_keys:ste:1.
Definition oval:ssg-file_permissions_sshd_private_key:def:1: true
Evaluation done.

In case openssh-server RPM is installed into the chroot directory the error does not occur as there is ssh_keys in /etc/group:
# grep ssh_keys /chroot_dir/etc/group
ssh_keys:x:996:


Actual results:
Error is printed by openscap when evaluating oval:ssg-file_permissions_sshd_private_key:def:1 OVAL definition and openssh-server RPM is not installed on the filesystem (no ssh_keys in /etc/group).


Expected results:
No error


Additional info:

Comment 2 Jan Černý 2023-01-23 15:11:26 UTC
a fix has been merged to upstream https://github.com/OpenSCAP/openscap/pull/1916

Comment 10 errata-xmlrpc 2023-05-09 07:52:53 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-2023:2391


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