documentation_complete: true


title: 'Add nosuid Option to /var/log'

description: |-
    The <tt>nosuid</tt> mount option can be used to prevent
    execution of setuid programs in <tt>/var/log</tt>. The SUID and SGID permissions
    should not be required in directories containing log files.
    {{{ describe_mount(option="nosuid", part="/var/log") }}}

rationale: |-
    The presence of SUID and SGID executables should be tightly controlled. Users
    should not be able to execute SUID or SGID binaries from partitions
    designated for log files.

{{{ complete_ocil_entry_mount_option("/var/log", "nosuid") }}}

severity: medium

identifiers:
    cce@rhel8: CCE-82065-4
    cce@rhel9: CCE-83870-6
    cce@rhel10: CCE-90639-6
    cce@sle12: CCE-91589-2
    cce@sle15: CCE-91275-8

references:
    nerc-cip: CIP-003-8 R5.1.1,CIP-003-8 R5.3,CIP-004-6 R2.3,CIP-007-3 R2.1,CIP-007-3 R2.2,CIP-007-3 R2.3,CIP-007-3 R5.1,CIP-007-3 R5.1.1,CIP-007-3 R5.1.2
    nist: CM-7(a),CM-7(b),CM-6(a),AC-6,AC-6(1),MP-7
    nist-csf: PR.IP-1,PR.PT-2,PR.PT-3
    srg: SRG-OS-000368-GPOS-00154
    stigid@ol8: OL08-00-040127

platform: mount[var-log]

template:
    name: mount_option
    vars:
        mountpoint: /var/log
        mountoption: nosuid

fixtext: |-
    {{{ fixtext_mount_option("/var/log", "nosuid") }}}

srg_requirement: '{{{ srg_requirement_mount_option("/var/log", "nosuid") }}}'
