Skip to content

Commit 7f80a3d

Browse files
authored
Merge pull request #14637 from macko1/update_rhel8_disa_stig_to_v2r7
DISA STIG: Update RHEL8 V2R6 → V2R7
2 parents c32f292 + 110b960 commit 7f80a3d

14 files changed

Lines changed: 48 additions & 27 deletions

File tree

linux_os/guide/system/permissions/partitions/mount_option_boot_efi_nosuid/policy/stig/shared.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ vuldiscussion: |-
77
88
99
checktext: |-
10-
Note: For systems that use BIOS, this requirement is Not Applicable.
11-
12-
Note: If the /boot/efi partition is mounted with a vfat filesystem, this requirement is Not Applicable.
10+
Note: For systems that use BIOS, this requirement is not applicable.
1311
1412
Verify the /boot/efi directory is mounted with the "nosuid" option with the following command:
1513

linux_os/guide/system/permissions/partitions/mount_option_boot_efi_nosuid/rule.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ template:
3333
vars:
3434
mountpoint: /boot/efi
3535
mountoption: nosuid
36-
exclude_filesystem_type: vfat
3736
backends:
3837
anaconda: "off"
3938

linux_os/guide/system/permissions/partitions/mount_option_boot_efi_nosuid/tests/vfat_with_nosuid.pass.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22

33
# This test verifies that the rule passes when /boot/efi is mounted with vfat filesystem
4-
# Even with nosuid set, vfat is excluded from the requirement (nosuid has no effect on vfat)
54

65
# packages = dosfstools
76

@@ -14,7 +13,7 @@ VFAT_PARTITION="/root/vfat_partition"
1413
dd if=/dev/zero of=$VFAT_PARTITION bs=1M count=50
1514
mkfs.vfat $VFAT_PARTITION
1615

17-
# Add to fstab with nosuid option (should still pass because vfat is excluded)
16+
# Add to fstab with nosuid option
1817
mkdir -p /boot/efi
1918
echo "$VFAT_PARTITION /boot/efi vfat rw,nosuid,relatime,loop 0 0" >> /etc/fstab
2019

linux_os/guide/system/permissions/partitions/mount_option_boot_efi_nosuid/tests/vfat_without_nosuid.pass.sh renamed to linux_os/guide/system/permissions/partitions/mount_option_boot_efi_nosuid/tests/vfat_without_nosuid.fail.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
# This test verifies that the rule passes when /boot/efi is mounted with vfat filesystem
4-
# The nosuid requirement is not applicable to vfat filesystems
3+
# This test verifies that the rule fails when /boot/efi
4+
# is mounted with vfat without the nosuid option
55

66
# packages = dosfstools
77

@@ -14,7 +14,7 @@ VFAT_PARTITION="/root/vfat_partition"
1414
dd if=/dev/zero of=$VFAT_PARTITION bs=1M count=50
1515
mkfs.vfat $VFAT_PARTITION
1616

17-
# Add to fstab without nosuid option (should pass because vfat is excluded)
17+
# Add to fstab without the nosuid option
1818
mkdir -p /boot/efi
1919
echo "$VFAT_PARTITION /boot/efi vfat rw,relatime,loop 0 0" >> /etc/fstab
2020

linux_os/guide/system/permissions/restrictions/enable_execshield_settings/sysctl_kernel_kptr_restrict/rule.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ ocil: |-
3939
The runtime status of the <code>kernel.kptr_restrict</code> kernel parameter can be queried
4040
by running the following command:
4141
<pre>$ sysctl kernel.kptr_restrict</pre>
42-
The output of the command should indicate either:
42+
The output of the command should indicate:
4343
<code>kernel.kptr_restrict = 1</code>
44+
{{% if product != 'rhel8' %}}
4445
or:
4546
<code>kernel.kptr_restrict = 2</code>
47+
{{% endif %}}
4648
The output of the command should not indicate:
4749
<code>kernel.kptr_restrict = 0</code>
4850
@@ -55,12 +57,14 @@ ocil: |-
5557
<pre>$ grep -r '^\s*kernel.kptr_restrict\s*=' /etc/sysctl.conf /etc/sysctl.d</pre>
5658
The command should not find any assignments other than:
5759
kernel.kptr_restrict = 1
60+
{{% if product != 'rhel8' %}}
5861
or:
5962
kernel.kptr_restrict = 2
63+
{{% endif %}}
6064
6165
Conflicting assignments are not allowed.
6266
63-
ocil_clause: "the kernel.kptr_restrict is not set to 1 or 2 or is configured to be 0"
67+
ocil_clause: "the kernel.kptr_restrict is not set to 1{{% if product != 'rhel8' %}} or 2{{% endif %}} or is configured to be 0"
6468

6569
srg_requirement: '{{{ full_name }}} must restrict exposed kernel pointer addresses access.'
6670

@@ -70,7 +74,10 @@ template:
7074
name: sysctl
7175
vars:
7276
sysctlvar: kernel.kptr_restrict
73-
{{% if 'ol' in families or 'rhel' in product %}}
77+
{{% if product == 'rhel8' %}}
78+
sysctlval: '1'
79+
wrong_sysctlval_for_testing: "0"
80+
{{% elif 'ol' in families or 'rhel' in product %}}
7481
sysctlval:
7582
- '1'
7683
- '2'

linux_os/guide/system/permissions/restrictions/enable_execshield_settings/sysctl_kernel_kptr_restrict/tests/value_2.pass.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
2+
{{% if product == 'rhel8' %}}
3+
# platform = Not Applicable
4+
{{% else %}}
25
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_almalinux
6+
{{% endif %}}
37

48
# Clean sysctl config directories
59
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
# platform = Red Hat Enterprise Linux 8
3+
4+
# Clean sysctl config directories
5+
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/*
6+
7+
sed -i "/kernel.kptr_restrict/d" /etc/sysctl.conf
8+
echo "kernel.kptr_restrict = 2" >> /etc/sysctl.conf
9+
10+
# set correct runtime value to check if the filesystem configuration is evaluated properly
11+
sysctl -w kernel.kptr_restrict="2"

linux_os/guide/system/permissions/restrictions/kernel_module_uvcvideo_disabled/rule.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,29 @@ ocil_clause: 'the command does not return any output, or the line is commented o
2727
ocil: |-
2828
If the device or {{{ full_name }}} does not have a camera installed, this requirement is not applicable.
2929
30-
This requirement is not applicable to mobile devices (smartphones and tablets), where the use of the camera is a local AO decision.
30+
This requirement is not applicable to mobile devices (smartphones and tablets), where the use of the camera is a local Authorizing Official (AO) decision.
3131
3232
This requirement is not applicable to dedicated VTC suites located in approved VTC locations that are centrally managed.
3333
3434
For an external camera, if there is not a method for the operator to manually disconnect the camera at the end of collaborative computing sessions, this is a finding.
3535
3636
For a built-in camera, the camera must be protected by a camera cover (e.g., laptop camera cover slide) when not in use. If the built-in camera is not protected with a camera cover, or is not physically disabled, this is a finding.
3737
38-
If the camera is not disconnected, covered, or physically disabled, determine if it is being disabled via software with the following commands:
38+
If the camera is not disconnected, covered, or physically disabled, determine if it is being disabled via software.
3939
40-
Verify the operating system disables the ability to load the uvcvideo kernel module.
40+
Verify the operating system disables the ability to load the uvcvideo kernel module and ensure that the uvcvideo protocol module is disabled with the following command:
4141
42-
$ sudo grep -r uvcvideo /etc/modprobe.d/* | grep "/bin/true"
42+
$ sudo grep -r uvcvideo /etc/modprobe.d/
4343
44-
install uvcvideo /bin/true
44+
/etc/modprobe.d/uvcvideo-blacklist.conf:install uvcvideo /bin/false
45+
/etc/modprobe.d/uvcvideo-blacklist.conf:blacklist uvcvideo
4546
4647
fixtext: |-
4748
Configure {{{ full_name }}} to disable the built-in or attached camera when not in use.
4849
49-
Build or modify the "/etc/modprobe.d/blacklist.conf" file by using the following example:
50+
Add or update the following lines in the "/etc/modprobe.d/uvcvideo-blacklist.conf" file:
5051
51-
install uvcvideo /bin/true
52+
install uvcvideo /bin/false
5253
blacklist uvcvideo
5354
5455
Reboot the system for the settings to take effect.

linux_os/guide/system/software/integrity/crypto/configure_libreswan_crypto_policy/policy/stig/shared.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ vuldiscussion: |-
77
checktext: |-
88
Verify that the IPsec service uses the system crypto policy with the following command:
99
10-
Note: If the ipsec service is not installed, this requirement is Not Applicable.
10+
Note: If the IPsec service is not installed, this requirement is not applicable.
1111
1212
$ sudo grep include /etc/ipsec.conf /etc/ipsec.d/*.conf
1313

linux_os/guide/system/software/integrity/crypto/configure_libreswan_crypto_policy/rule.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ ocil_clause: |-
4040
the "IPsec" service is active and the ipsec configuration file does not contain does not contain <tt>include /etc/crypto-policies/back-ends/libreswan.config</tt>
4141
4242
ocil: |-
43-
Verify that the IPSec service uses the system crypto policy.
43+
Verify that the IPsec service uses the system crypto policy.
4444
45-
If the ipsec service is not installed is not applicable.
45+
If the IPsec service is not installed, this requirement is not applicable.
4646
4747
Check to see if the "IPsec" service is active with the following command:
4848

0 commit comments

Comments
 (0)