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 2213958 - Rules "Set Existing Passwords Maximum/Minimum Age" apply to non-local users as well
Summary: Rules "Set Existing Passwords Maximum/Minimum Age" apply to non-local users a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: scap-security-guide
Version: 9.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: Milan Lysonek
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks: 2228467 2228468
TreeView+ depends on / blocked
 
Reported: 2023-06-10 10:56 UTC by Renaud Métrich
Modified: 2023-11-07 10:08 UTC (History)
9 users (show)

Fixed In Version: scap-security-guide-0.1.69-1.el9
Doc Type: Bug Fix
Doc Text:
.Password age rules apply only to local users Some compliance profiles, for example CIS and DISA STIG, contain the following rules checking password age and password expiration of user account passwords: * `accounts_password_set_max_life_existing` * `accounts_password_set_min_life_existing` * `accounts_password_set_warn_age_existing` * `accounts_set_post_pw_existing` These rules correctly check the configuration of local users. Previously, the scanner also incorrectly checked the configuration of remote users provided by network sources such as NSS even though the remediation scripts could not change remote users’ configuration. This was because the OpenSCAP scanner previously used the `getpwent()` system call. This update changes the internal implementation of these rules to depend only on the data from the `/etc/shadow` file. As a result, the rules now apply only to the local users’ configuration.
Clone Of:
: 2228467 2228468 (view as bug list)
Environment:
Last Closed: 2023-11-07 08:37:02 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-159440 0 None None None 2023-06-10 10:56:27 UTC
Red Hat Product Errata RHBA-2023:6552 0 None None None 2023-11-07 08:37:35 UTC

Description Renaud Métrich 2023-06-10 10:56:04 UTC
Description of problem:

e.g. xccdf_org.ssgproject.content_rule_accounts_password_set_max_life_existing

This is a similar to BZ #2203791 but for password check.

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
 30   <unix:shadow_object id="object_shadow_password_users_max_life_existing" version="1">
 31     <unix:username operation="pattern match">.*</unix:username>
 32     <filter action="include">filter_no_passwords_or_locked_accounts_max_life</filter>
 33   </unix:shadow_object>
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

The implementation relies on "unix:shadow_object" which makes use of getpwent(), which browses all users provides by the NSS "shadow" map:

Source code (src/OVAL/probes/unix/shadow_probe.c):
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
180 static int read_shadow(SEXP_t *un_ent, probe_ctx *ctx)
181 {
182         int err = 1;
183         struct spwd *pw;
184 
185         while ((pw = getspent())) {
 :
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Systems using 3rd party CentrifyDC NSS provider have a "shadow: centrifydc" line in /etc/nsswitch.conf, causing the remote users to be affected by these rules.

Version-Release number of selected component (if applicable):

scap-security-guide
openscap-scanner

How reproducible:

Always on Centrify systems

Comment 2 Jan Černý 2023-07-13 13:40:30 UTC
A pull request has been submitted to upstream for a review https://github.com/ComplianceAsCode/content/pull/10838

Comment 3 Jan Černý 2023-07-18 11:46:52 UTC
a fix has been merged upstream in https://github.com/ComplianceAsCode/content/pull/10838

Comment 21 errata-xmlrpc 2023-11-07 08:37:02 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 (scap-security-guide 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:6552


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