OL08-00-020028 - OL 8 systems below version 8.2 must configure SELinux context type to allow the use of a non-default faillock tally directory.

Information

By limiting the number of failed logon attempts, the risk of unauthorized system access via user password guessing, otherwise known as brute-force attacks, is reduced. Limits are imposed by locking the account.

From 'Pam_Faillock' man pages: Note that the default directory that 'pam_faillock' uses is usually cleared on system boot so the access will be reenabled after system reboot. If that is undesirable, a different tally directory must be set with the 'dir' option.

SELinux, enforcing a targeted policy, will require any non-default tally directory's security context type to match the default directory's security context type. Without updating the security context type, the pam_faillock module will not write failed login attempts to the non-default tally directory.

Satisfies: SRG-OS-000021-GPOS-00005, SRG-OS-000329-GPOS-00128

Solution

Configure OL 8 to allow the use of a non-default faillock tally directory while SELinux enforces a targeted policy.

Update the /etc/selinux/targeted/contexts/files/file_contexts.local with 'faillog_t' context type for the non-default faillock tally directory with the following command:

$ sudo semanage fcontext -a -t faillog_t '/var/log/faillock(/.*)?'

Next, update the context type of the non-default faillock directory/subdirectories and files with the following command:

$ sudo restorecon -R -v /var/log/faillock

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Oracle_Linux_8_V1R9_STIG.zip

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-7a., 800-53|AC-7b., CAT|II, CCI|CCI-000044, CCI|CCI-002238, Rule-ID|SV-248670r853792_rule, STIG-ID|OL08-00-020028, Vuln-ID|V-248670

Plugin: Unix

Control ID: 276e79f5e71d23721f5b35664f9a4b6ea202a0370f9e2fd83f5137863f6acb71