SV-269423r1198253_rule
V-269423
SRG-OS-000132-GPOS-00067
ALMA-09-040830
CAT II
10
Configure AlmaLinux OS 9 to restrict exposed kernel pointer addresses access with the following command:
$ echo "kernel.kptr_restrict = 1" > /etc/sysctl.d/60-kptr.conf
Load settings from all system configuration files with the following command:
$ sysctl --system
Verify the runtime status of the kernel.kptr_restrict kernel parameter with the following command:
$ sysctl kernel.kptr_restrict
kernel.kptr_restrict = 1
Verify the configuration of the kernel.kptr_restrict kernel parameter with the following command:
$ /usr/lib/systemd/systemd-sysctl --cat-config | egrep -v '^(#|;)' | grep -F kernel.kptr_restrict | tail -1
kernel.kptr_restrict =1
If "kernel.kptr_restrict" is not set to "1" or is missing, this is a finding.
V-269423
False
ALMA-09-040830
Verify the runtime status of the kernel.kptr_restrict kernel parameter with the following command:
$ sysctl kernel.kptr_restrict
kernel.kptr_restrict = 1
Verify the configuration of the kernel.kptr_restrict kernel parameter with the following command:
$ /usr/lib/systemd/systemd-sysctl --cat-config | egrep -v '^(#|;)' | grep -F kernel.kptr_restrict | tail -1
kernel.kptr_restrict =1
If "kernel.kptr_restrict" is not set to "1" or is missing, this is a finding.
M
5664