Skip to content

Commit 02af5e0

Browse files
authored
Merge pull request #12906 from alanmcanonical/ubt24_53313
Ubuntu 24.04: Implement rule 5.3.3.1.3 Ensure password failed attempts lockout includes root account
2 parents f0771a3 + 5dfdd22 commit 02af5e0

File tree

3 files changed

+39
-2
lines changed
  • components
  • controls
  • linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_root_unlock_time

3 files changed

+39
-2
lines changed

components/pam.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ rules:
8585
- accounts_passwords_pam_faillock_enforce_local
8686
- accounts_passwords_pam_faillock_interval
8787
- accounts_passwords_pam_faillock_silent
88+
- accounts_passwords_pam_faillock_root_unlock_time
8889
- accounts_passwords_pam_faillock_unlock_time
8990
- accounts_passwords_pam_faillock_enabled
9091
- accounts_passwords_pam_tally2

controls/cis_ubuntu2404.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,8 +1913,10 @@ controls:
19131913
levels:
19141914
- l2_server
19151915
- l2_workstation
1916-
status: planned
1917-
notes: TODO. Rule does not seem to be implemented, nor does it map to any rules in ubuntu2204 profile.
1916+
rules:
1917+
- var_accounts_passwords_pam_faillock_unlock_time=900
1918+
- accounts_passwords_pam_faillock_root_unlock_time
1919+
status: automated
19181920

19191921
- id: 5.3.3.2.1
19201922
title: Ensure password number of changed characters is configured (Automated)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
documentation_complete: true
2+
3+
4+
title: 'Set Root Lockout Time for Failed Password Attempts'
5+
6+
description: |-
7+
This rule configures the system to lock out root during a specified time period after a
8+
number of incorrect login attempts using <tt>pam_faillock.so</tt>.
9+
10+
Ensure that the file <tt>/etc/security/faillock.conf</tt> contains the following entry:
11+
<tt>root_unlock_time=&lt;interval-in-seconds&gt;</tt> where
12+
<tt>interval-in-seconds</tt> is <tt>{{{xccdf_value("var_accounts_passwords_pam_faillock_unlock_time") }}}</tt> or greater.
13+
14+
If <tt>root_unlock_time</tt> is set to <tt>0</tt>, it may enable attacker to
15+
apply denial of service to legitimate users.
16+
17+
rationale: |-
18+
By limiting the number of failed logon attempts the risk of unauthorized root
19+
access via password guessing, otherwise known as brute-forcing, is reduced.
20+
Limits are imposed by locking the account.
21+
22+
severity: medium
23+
24+
platform: package[pam]
25+
26+
template:
27+
name: pam_account_password_faillock
28+
vars:
29+
prm_name: root_unlock_time
30+
prm_regex_conf: ^[\s]*root_unlock_time[\s]*=[\s]*([0-9]+)
31+
prm_regex_pamd: ^[\s]*auth[\s]+.+[\s]+pam_faillock.so[\s]+[^\n]*root_unlock_time=([0-9]+)
32+
ext_variable: var_accounts_passwords_pam_faillock_unlock_time
33+
description: The unlock time after number of failed logins should be set correctly.
34+
variable_lower_bound: use_ext_variable

0 commit comments

Comments
 (0)