Vulnerability Discussion
An isolation boundary provides access control and protects the integrity of the hardware, software, and firmware that perform security functions.
Security functions are the hardware, software, and/or firmware of the information system responsible for enforcing the system security policy and supporting the isolation of code and data on which the protection is based. Operating systems implement code separation (i.e., separation of security functions from nonsecurity functions) in a number of ways, including through the provision of security kernels via processor rings or processor modes. For nonkernel code, security function isolation is often achieved through file system protections that serve to protect the code on disk and address space protections that protect executing code.
Developers and implementers can increase the assurance in security functions by employing well-defined security policy models; structured, disciplined, and rigorous hardware and software development techniques; and sound system/security engineering principles. Implementation may include isolation of memory space and libraries. Operating systems restrict access to security functions through the use of access control mechanisms and by implementing least privilege capabilities.
Check
Ensure that AlmaLinux OS 9 verifies correct operation of security functions through the use of SELinux with the following command:
$ getenforce
Enforcing
If SELINUX is not set to "Enforcing", this is a finding.
Verify that SELinux is configured to be enforcing at boot.
$ grep -E "^SELINUX=" /etc/selinux/config
SELINUX=enforcing
If SELINUX line is missing, commented out, or not set to "enforcing", this is a finding.
Verify that SELinux is enabled and Enforcing for all kernels:
$ grubby --info=ALL | grep -E 'selinux|enforcing'
args="ro audit=1 selinux=1 enforcing=1 audit_backlog_limit=8192 page_poison=1 vsyscall=none slub_debug=P pti=on iommu=force resume=/dev/mapper/luks-89bf0df8-547f-4613-af07-215e5f62e9a9 rd.luks.uuid=luks-8a7154ec-8eeb-46c8-9d75-66fc4b80d665 rd.lvm.lv=rootvg/root rd.luks.uuid=luks-89bf0df8-547f-4613-af07-215e5f62e9a9 rd.lvm.lv=rootvg/swap rd.shell=0 quiet splash fips=1 boot=UUID=eda01e9b-b7e1-431b-9549-16d5dcddf665"
args="ro audit=1 selinux=1 enforcing=1 audit_backlog_limit=8192 page_poison=1 vsyscall=none slub_debug=P pti=on iommu=force resume=/dev/mapper/luks-89bf0df8-547f-4613-af07-215e5f62e9a9 rd.luks.uuid=luks-8a7154ec-8eeb-46c8-9d75-66fc4b80d665 rd.lvm.lv=rootvg/root rd.luks.uuid=luks-89bf0df8-547f-4613-af07-215e5f62e9a9 rd.lvm.lv=rootvg/swap rd.shell=0 quiet splash fips=1 boot=UUID=eda01e9b-b7e1-431b-9549-16d5dcddf665"
If selinux=1 is missing or set to 0, or enforcing=1 is missing or set to 0, this is a finding.
Fix
Configure AlmaLinux OS 9 to verify correct operation of security functions.
Edit the file "/etc/selinux/config" and add or modify the following line:
SELINUX=enforcing
Update the grub bootloader settings:
$ grubby --args="selinux=1 enforcing=1" --update-kernel=ALL
A reboot is required for the changes to take effect.