Skip to content

PAM rule false positive #14313

@rwmanos

Description

@rwmanos

Description of problem:

The 'Ensure PAM Enforces Password Requirements - Prevent the Use of Dictionary Words' rule fails, for example on a RHEL9 node, when the dictcheck option is commented out.

Details:

Reproduce:

$ grep dictcheck /etc/security/pwquality.conf
# dictcheck = 1
$ oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis --report report.html --rule xccdf_org.ssgproject.content_rule_accounts_password_pam_dictcheck /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
--- Starting Evaluation ---

Title   Ensure PAM Enforces Password Requirements - Prevent the Use of Dictionary Words
Rule    xccdf_org.ssgproject.content_rule_accounts_password_pam_dictcheck
Ident   CCE-88413-0
Result  fail

In the OVAL test results details, the first test is true but the second is false
check the configuration of /etc/pam.d/system-auth -> true
check the configuration of /etc/security/pwquality.conf -> false

oval:ssg-test_password_pam_pwquality_dictcheck:tst:1  false
No items have been found conforming to the following objects:
Object oval:ssg-obj_password_pam_pwquality_dictcheck:obj:1 of type textfilecontent54_object
Filepath	Pattern	Instance
^/etc/security/pwquality\.conf(\.d/[^/]+\.conf)?$	^\s*dictcheck[\s]*=[\s]*(-?\d+)(?:[\s]|$)	1

From what I understand, it fails because the 'dictcheck' line is commented out and it only passes when it is set AND it is set to 1.

However, this seems too strict. For example, CIS_Red_Hat_Enterprise_Linux_9_Benchmark_v2.0.0 defines that you need to verify that the dictcheck option is not set to 0 (disabled). And commenting it out is a valid remediation. This is also supported by the man page since the default value of dictcheck is 1 in pwquality.conf.

Could you adjust this rule to fail if and only if the option is set to 0?

Outcome:

  • This project's content can be improved:
    • Check needs to be improved.
    • Remediation needs to be improved.
  • The external content's check is faulty - the other party needs to be notified, they have work to do.

SCAP Security Guide Version:

$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.7 (Plow)
$ rpm -q openscap scap-security-guide
openscap-1.3.12-1.el9_6.x86_64
scap-security-guide-0.1.79-1.el9.noarch

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions