SV-257569r961665_rule
V-257569
SRG-APP-000450-CTR-001105
CNTR-OS-000870
CAT II
10
Apply the machine config to implement ASLR by executing the following:
for mcpool in $(oc get mcp -oname | sed "s:.*/::" ); do
echo "apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
name: 75-sysctl-kernel-randomize-va-space-$mcpool
labels:
machineconfiguration.openshift.io/role: $mcpool
spec:
config:
ignition:
version: 3.1.0
storage:
files:
- contents:
source: data:,kernel.randomize_va_space%3D2%0A
mode: 0644
path: /etc/sysctl.d/75-sysctl_kernel_randomize_va_space.conf
overwrite: true
" | oc apply -f -
done
Verify Red Hat Enterprise Linux CoreOS (RHCOS) implements ASLR by executing the following:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; sysctl kernel.randomize_va_space
' 2>/dev/null; done
If "kernel.randomize_va_space" is not set to "2", this is a finding.
V-257569
False
CNTR-OS-000870
Verify Red Hat Enterprise Linux CoreOS (RHCOS) implements ASLR by executing the following:
for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; sysctl kernel.randomize_va_space
' 2>/dev/null; done
If "kernel.randomize_va_space" is not set to "2", this is a finding.
M
5547