documentation_complete: true

title: 'Ensure the Logon Failure Delay is Set Correctly in login.defs'

description: |-
    To ensure the logon failure delay controlled by <tt>{{{ login_defs_path }}}</tt> is set properly,
    add or correct the <tt>FAIL_DELAY</tt> setting in <tt>{{{ login_defs_path }}}</tt> to read as follows:
    <pre>FAIL_DELAY {{{ xccdf_value("var_accounts_fail_delay") }}}</pre>

rationale: |-
    Increasing the time between a failed authentication attempt and re-prompting to
    enter credentials helps to slow a single-threaded brute force attack.

severity: medium

identifiers:
    cce@rhel8: CCE-84037-1
    cce@rhel9: CCE-83635-3
    cce@rhel10: CCE-86822-4
    cce@sle12: CCE-83028-1
    cce@slmicro5: CCE-94093-2
    cce@slmicro6: CCE-95034-5

references:
    cis-csc: 11,3,9
    cobit5: BAI10.01,BAI10.02,BAI10.03,BAI10.05
    isa-62443-2009: 4.3.4.3.2,4.3.4.3.3
    isa-62443-2013: 'SR 7.6'
    iso27001-2013: A.12.1.2,A.12.5.1,A.12.6.2,A.14.2.2,A.14.2.3,A.14.2.4
    nist: AC-7(b),CM-6(a)
    nist-csf: PR.IP-1
    srg: SRG-OS-000480-GPOS-00226
    stigid@ol7: OL07-00-010430
    stigid@ol8: OL08-00-020310
    stigid@sle12: SLES-12-010140

ocil_clause: 'the value of "FAIL_DELAY" is not set to "{{{ xccdf_value("var_accounts_fail_delay") }}}" or greater, or the line is commented out'

ocil: |-
    Verify {{{ full_name }}} enforces a delay of at least {{{ xccdf_value("var_accounts_fail_delay") }}} seconds between console logon prompts following a failed logon attempt with the following command:

    <pre>$ sudo grep -i "FAIL_DELAY" {{{ login_defs_path }}}
    FAIL_DELAY {{{ xccdf_value("var_accounts_fail_delay") }}}</pre>

platform: package[shadow-utils] and system_with_kernel

fixtext: |-
    Configure the {{{ full_name }}} to enforce a delay of at least {{{ xccdf_value("var_accounts_fail_delay") }}} seconds between logon prompts following a failed console logon attempt.

    Modify the "{{{ login_defs_path }}}" file to set the "FAIL_DELAY" parameter to {{{ xccdf_value("var_accounts_fail_delay") }}} or greater:

    FAIL_DELAY {{{ xccdf_value("var_accounts_fail_delay") }}}

srg_requirement: '{{{ full_name }}} must enforce a delay of at least four seconds between logon prompts following a failed logon attempt.'
