Skip to content

Conversation

@iankko
Copy link

@iankko iankko commented Jan 14, 2015

Fix OVAL check for accounts_passwords_pam_faillock_deny rule to require exact setting from second example of pam_faillock(8) manual page instead of to require incorrect setting listed at:
    [1] https://access.redhat.com/solutions/62949

Further details:
The current OVAL check implementation is based on configuration as documented at:
    [1] https://access.redhat.com/solutions/62949

We have previously checked this setting / configuration with PAM faillock PAM module maintainer and according to their opinion the recommendation listed at [1] is wrong (it's not possible to extract just interesting bits from pam_faillock.so(8) manual page example and use them in arbitrary order [since order of PAM modules is also crucial for proper work of the setting]).

Following the suggestion from the developer to rather base on the second example from the pam_faillock(8) manual page, we have implemented shared c404af9 remediation script for this rule.

See also details in #304 for explanation why currently used pam_faillock.so deny OVAL check is wrong & why it should be based on the second pam_faillock.so(8) example instead.

This patch / PR proposal is just completion / applying the same settings expectations to the underlying OVAL check too.

Testing report:

The proposed change has been tested on all three products (RHEL-6, RHEL-7 & Fedora 20) & works fine / works as expected.

Please review.

Thank you, Jan.

Version 2 - the second patch (iankko@45792dd) yet enhances the original proposal to include checks also for preauth silent rows to be present in both /etc/pam.d/system-auth and /etc/pam.d/password-auth as suggested by Tomas Mraz (PAM package maintainer). This version also ensures the value of deny in preauth row matches the value of required failed logins (value of var_accounts_passwords_pam_faillock_deny variable).

Please review.

Thank you, Jan.

Jan Lieskovsky added 2 commits January 14, 2015 15:47
to require exact setting from second example of pam_faillock(8) manual page
as suggested by PAM faillock module maintainer (instead of to require incorrect
setting listed at: https://access.redhat.com/solutions/62949)
After discussion with Tomas Mraz (PAM maintainer) add check for pam_faillock.so's
'preauth silent' row presence in /etc/pam.d/{system,password}-auth yet. Also
add check the 'deny' value in 'preauth' row matches the required maximum number
of failed login attempts (value of 'var_accounts_passwords_pam_faillock_deny' variable).
@iankko iankko added Fedora Fedora product related. RHEL6 RHEL Red Hat Enterprise Linux product related. bugfix Fixes to reported bugs. labels Jan 14, 2015
@iankko iankko added this to the 0.1.20 milestone Jan 14, 2015
@mpreisler
Copy link
Member

ACK

mpreisler added a commit that referenced this pull request Jan 15, 2015
[shared] Modify OVAL check for accounts_passwords_pam_faillock_deny rule
@mpreisler mpreisler merged commit 2de0a05 into ComplianceAsCode:master Jan 15, 2015
@iankko
Copy link
Author

iankko commented Jan 15, 2015

@mpreisler Thank you for the review.

@iankko iankko deleted the pam_faillock_deny_fix_oval branch January 15, 2015 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes to reported bugs. Fedora Fedora product related. RHEL Red Hat Enterprise Linux product related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants