STIGQter STIGQter: STIG Summary: Red Hat Enterprise Linux 8 Security Technical Implementation Guide Version: 1 Release: 2 Benchmark Date: 23 Apr 2021:

The RHEL 8 fapolicy module must be configured to employ a deny-all, permit-by-exception policy to allow the execution of authorized software programs.

DISA Rule

SV-230523r627750_rule

Vulnerability Number

V-230523

Group Title

SRG-OS-000368-GPOS-00154

Rule Version

RHEL-08-040135

Severity

CAT II

CCI(s)

Weight

10

Fix Recommendation

Configure RHEL 8 to employ a deny-all, permit-by-exception application whitelisting policy with "fapolicyd" using the following commands:

Install and enable "fapolicyd":

$ sudo yum install fapolicyd.x86_64

$ sudo mount | egrep '^tmpfs| ext4| ext3| xfs' | awk '{ printf "%s\n", $3 }' >> /etc/fapolicyd/fapolicyd.mounts

$ sudo systemctl enable --now fapolicyd

With the "fapolicyd" installed and enabled, configure the daemon to function in permissive mode until the whitelist is built correctly to avoid system lockout. Do this by editing the "/etc/fapolicyd/fapolicyd.conf" file with the following line:

permissive = 1

Build the whitelist in the "/etc/fapolicyd/fapolicyd.rules" file ensuring the last rule is "deny all all".

Once it is determined the whitelist is built correctly, set the fapolicyd to enforcing mode by editing the "permissive" line in the /etc/fapolicyd/fapolicyd.conf file.

permissive = 0

Check Contents

Verify the RHEL 8 "fapolicyd" is enabled and employs a deny-all, permit-by-exception policy.

Check that "fapolicyd" is installed, running, and in enforcing mode with the following commands:

$ sudo yum list installed fapolicyd

Installed Packages
fapolicyd.x86_64

$ sudo systemctl status fapolicyd.service

fapolicyd.service - File Access Policy Daemon
Loaded: loaded (/usr/lib/systemd/system/fapolicyd.service; enabled; vendor preset: disabled)
Active: active (running)

$ sudo grep permissive /etc/fapolicyd/fapolicyd.conf

permissive = 0

Check that fapolicyd employs a deny-all policy on system mounts with the following commands:

$ sudo tail /etc/fapolicyd/fapolicyd.rules

allow exe=/usr/bin/python3.4 dir=execdirs ftype=text/x-pyton
deny_audit pattern ld_so all
deny all all

$ sudo cat /etc/fapolicyd/fapolicyd.mounts

/dev/shm
/run
/sys/fs/cgroup
/
/home
/boot
/run/user/42
/run/user/1000

If fapolicyd is not running in enforcement mode on all system mounts with a deny-all, permit-by-exception policy, this is a finding.

Vulnerability Number

V-230523

Documentable

False

Rule Version

RHEL-08-040135

Severity Override Guidance

Verify the RHEL 8 "fapolicyd" is enabled and employs a deny-all, permit-by-exception policy.

Check that "fapolicyd" is installed, running, and in enforcing mode with the following commands:

$ sudo yum list installed fapolicyd

Installed Packages
fapolicyd.x86_64

$ sudo systemctl status fapolicyd.service

fapolicyd.service - File Access Policy Daemon
Loaded: loaded (/usr/lib/systemd/system/fapolicyd.service; enabled; vendor preset: disabled)
Active: active (running)

$ sudo grep permissive /etc/fapolicyd/fapolicyd.conf

permissive = 0

Check that fapolicyd employs a deny-all policy on system mounts with the following commands:

$ sudo tail /etc/fapolicyd/fapolicyd.rules

allow exe=/usr/bin/python3.4 dir=execdirs ftype=text/x-pyton
deny_audit pattern ld_so all
deny all all

$ sudo cat /etc/fapolicyd/fapolicyd.mounts

/dev/shm
/run
/sys/fs/cgroup
/
/home
/boot
/run/user/42
/run/user/1000

If fapolicyd is not running in enforcement mode on all system mounts with a deny-all, permit-by-exception policy, this is a finding.

Check Content Reference

M

Target Key

2921

Comments