ALMA-09-008380 - AlmaLinux OS 9 must configure the appropriate SELinux context on the nondefault 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-forcing, is reduced. Limits are imposed by locking the account.

Not having the correct SELinux context on the faillock directory may lead to unauthorized access to the directory meaning that accounts could be unlocked by a nonadministrator.

Solution

Configure AlmaLinux OS 9 to allow the use of a nondefault faillock tally directory while SELinux enforces a targeted policy.

Create a nondefault faillock tally directory (if it does not already exist) using the following command:

$ mkdir /var/log/faillock

Update the /etc/selinux/targeted/contexts/files/file_contexts.local file with the "faillog_t" context type for the nondefault faillock tally directory using the following command:

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

Update the context type of the nondefault faillock directory and files within using the following command:

$ restorecon -RFv /var/log/faillock

See Also

https://workbench.cisecurity.org/benchmarks/0

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-7b., CAT|II, CCI|CCI-002238, Rule-ID|SV-269155r1050037_rule, STIG-ID|ALMA-09-008380, Vuln-ID|V-269155

Plugin: Unix

Control ID: f9fbf4dc2ad60799f86b7c68554bc9b19c993021d794ac5e703296f04963658a