diff --git a/linux_os/guide/system/bootloader-zipl/group.yml b/linux_os/guide/system/bootloader-zipl/group.yml
new file mode 100644
index 000000000000..36da84530ca0
--- /dev/null
+++ b/linux_os/guide/system/bootloader-zipl/group.yml
@@ -0,0 +1,11 @@
+documentation_complete: true
+
+title: 'zIPL bootloader configuration'
+
+description: |-
+ During the boot process, the bootloader is
+ responsible for starting the execution of the kernel and passing
+ options to it.
+ The default {{{ full_name }}} boot loader for s390x systems is called zIPL.
+
+platform: machine
diff --git a/linux_os/guide/system/bootloader-zipl/zipl_audit_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_audit_argument/rule.yml
new file mode 100644
index 000000000000..16c0b3f89a0a
--- /dev/null
+++ b/linux_os/guide/system/bootloader-zipl/zipl_audit_argument/rule.yml
@@ -0,0 +1,40 @@
+documentation_complete: true
+
+prodtype: rhel8
+
+title: 'Enable Auditing to Start Prior to the Audit Daemon in zIPL'
+
+description: |-
+ To ensure all processes can be audited, even those which start prior to the audit daemon,
+ check that all boot entries in /boot/loader/entries/*.conf have audit=1
+ included in its options.
+ Make sure /etc/zipl.conf doesn't contain image = setting,
+ as {{{ full_name }}} adheres to Boot Loader Specification (BLS).
+ And run zipl command so that /boot/bootmap is updated.
+
+ To ensure that new kernels and boot entries continue to enable audit,
+ add audit=1 to /etc/kernel/cmdline.
+
+rationale: |-
+ Each process on the system carries an "auditable" flag which indicates whether
+ its activities can be audited. Although auditd takes care of enabling
+ this for all processes which launch after it does, adding the kernel argument
+ ensures it is set for every process during boot.
+
+severity: medium
+
+ocil_clause: 'auditing is not enabled at boot time'
+
+ocil: |-
+ To check that audit is enabled at boot time, check all boot entries with following command:
+
sudo grep -L "^options\s+.*\baudit=1\b" /boot/loader/entries/*.conf+ No line should be returned, each line returned is a boot entry that doesn't enable audit. + + Check that no image file is specified in /etc/zipl.conf: +
grep -R "^image\s*=" /etc/zipl.conf+ No line should be returned, if a line is returned zipl may load a different kernel than intended. + + And make sure that /boot/bootmap is newer than /boot/loader/entries/*.conf + and /etc/zipl.conf: +
find /boot/loader/entries/*.conf /etc/zipl.conf -newer /boot/bootmap+ No line should be returned, if a line is returned /boot/bootmap needs to be regenerated. diff --git a/linux_os/guide/system/bootloader-zipl/zipl_audit_backlog_limit_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_audit_backlog_limit_argument/rule.yml new file mode 100644 index 000000000000..47a532d50f2f --- /dev/null +++ b/linux_os/guide/system/bootloader-zipl/zipl_audit_backlog_limit_argument/rule.yml @@ -0,0 +1,41 @@ +documentation_complete: true + +prodtype: rhel8 + +title: 'Extend Audit Backlog Limit for the Audit Daemon in zIPL' + +description: |- + To improve the kernel capacity to queue all log events, even those which start prior to the audit daemon, + check that all boot entries in /boot/loader/entries/*.conf have audit_backlog_limit=8192 + included in its options.
sudo grep -L "^options\s+.*\baudit_backlog_limit=0\b" /boot/loader/entries/*.conf+ No line should be returned, each line returned is a boot entry that does not extend the log events queue. + + Check that no image file is specified in /etc/zipl.conf: +
grep -R "^image\s*=" /etc/zipl.conf+ No line should be returned, if a line is returned zipl may load a different kernel than intended. + + And make sure that /boot/bootmap is newer than /boot/loader/entries/*.conf + and /etc/zipl.conf: +
find /boot/loader/entries/*.conf /etc/zipl.conf -newer /boot/bootmap+ No line should be returned, if a line is returned /boot/bootmap needs to be regenerated. diff --git a/linux_os/guide/system/bootloader-zipl/zipl_enable_selinux/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_enable_selinux/rule.yml new file mode 100644 index 000000000000..5aa91c16aa27 --- /dev/null +++ b/linux_os/guide/system/bootloader-zipl/zipl_enable_selinux/rule.yml @@ -0,0 +1,37 @@ +documentation_complete: true + +prodtype: rhel8 + +title: 'Ensure SELinux Not Disabled in zIPL' + +description: |- + To ensure SELinux is not disabled at boot time, + check that no boot entry in /boot/loader/entries/*.conf has selinux=0 + included in its options.
sudo grep -L "^options\s+.*\bselinux=0\b" /boot/loader/entries/*.conf+ No line should be returned, each line returned is a boot entry that disables SELinux. + + Check that no image file is specified in /etc/zipl.conf: +
grep -R "^image\s*=" /etc/zipl.conf+ No line should be returned, if a line is returned zipl may load a different kernel than intended. + + And make sure that /boot/bootmap is newer than /boot/loader/entries/*.conf + and /etc/zipl.conf: +
find /boot/loader/entries/*.conf /etc/zipl.conf -newer /boot/bootmap+ No line should be returned, if a line is returned /boot/bootmap needs to be regenerated. diff --git a/linux_os/guide/system/bootloader-zipl/zipl_page_poison_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_page_poison_argument/rule.yml new file mode 100644 index 000000000000..854632575203 --- /dev/null +++ b/linux_os/guide/system/bootloader-zipl/zipl_page_poison_argument/rule.yml @@ -0,0 +1,41 @@ +documentation_complete: true + +prodtype: rhel8 + +title: 'Enable page allocator poisoning in zIPL' + +description: |- + To enable poisoning of free pages, + check that all boot entries in /boot/loader/entries/*.conf have page_poison=1 + included in its options.
sudo grep -L "^options\s+.*\bpage_poison=1\b" /boot/loader/entries/*.conf+ No line should be returned, each line returned is a boot entry that doesn't enable page poisoning. + + Check that no image file is specified in /etc/zipl.conf: +
grep -R "^image\s*=" /etc/zipl.conf+ No line should be returned, if a line is returned zipl may load a different kernel than intended. + + And make sure that /boot/bootmap is newer than /boot/loader/entries/*.conf + and /etc/zipl.conf: +
find /boot/loader/entries/*.conf /etc/zipl.conf -newer /boot/bootmap+ No line should be returned, if a line is returned /boot/bootmap needs to be regenerated. diff --git a/linux_os/guide/system/bootloader-zipl/zipl_pti_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_pti_argument/rule.yml new file mode 100644 index 000000000000..eaef25ce40d8 --- /dev/null +++ b/linux_os/guide/system/bootloader-zipl/zipl_pti_argument/rule.yml @@ -0,0 +1,40 @@ +documentation_complete: true + +prodtype: rhel8 + +title: 'Enable Kernel Page-Table Isolation (KPTI) in zIPL' + +description: |- + To enable Kernel page-table isolation, + check that all boot entries in /boot/loader/entries/*.conf have pti=on + included in its options.
sudo grep -L "^options\s+.*\bpti=on\b" /boot/loader/entries/*.conf+ No line should be returned, each line returned is a boot entry that doesn't enable page-table isolation . + + Check that no image file is specified in /etc/zipl.conf: +
grep -R "^image\s*=" /etc/zipl.conf+ No line should be returned, if a line is returned zipl may load a different kernel than intended. + + And make sure that /boot/bootmap is newer than /boot/loader/entries/*.conf + and /etc/zipl.conf: +
find /boot/loader/entries/*.conf /etc/zipl.conf -newer /boot/bootmap+ No line should be returned, if a line is returned /boot/bootmap needs to be regenerated. diff --git a/linux_os/guide/system/bootloader-zipl/zipl_slub_debug_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_slub_debug_argument/rule.yml new file mode 100644 index 000000000000..68e91a92d64d --- /dev/null +++ b/linux_os/guide/system/bootloader-zipl/zipl_slub_debug_argument/rule.yml @@ -0,0 +1,41 @@ +documentation_complete: true + +prodtype: rhel8 + +title: 'Enable SLUB/SLAB allocator poisoning in zIPL' + +description: |- + To enable poisoning of SLUB/SLAB objects, + check that all boot entries in /boot/loader/entries/*.conf have slub_debug=P + included in its options.
sudo grep -L "^options\s+.*\bslub_debug=P\b" /boot/loader/entries/*.conf+ No line should be returned, each line returned is a boot entry that does not enable poisoning. + + Check that no image file is specified in /etc/zipl.conf: +
grep -R "^image\s*=" /etc/zipl.conf+ No line should be returned, if a line is returned zipl may load a different kernel than intended. + + And make sure that /boot/bootmap is newer than /boot/loader/entries/*.conf + and /etc/zipl.conf: +
find /boot/loader/entries/*.conf /etc/zipl.conf -newer /boot/bootmap+ No line should be returned, if a line is returned /boot/bootmap needs to be regenerated. diff --git a/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml new file mode 100644 index 000000000000..9624b43349c4 --- /dev/null +++ b/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml @@ -0,0 +1,38 @@ +documentation_complete: true + +prodtype: rhel8 + +title: 'Disable vsyscalls in zIPL' + +description: |- + To disable use of virtual syscalls, + check that all boot entries in /boot/loader/entries/*.conf have vsyscall=none + included in its options.
sudo grep -L "^options\s+.*\bvsyscall=none\b" /boot/loader/entries/*.conf+ No line should be returned, each line returned is a boot entry that doesn't disable virtual syscalls. + + Check that no image file is specified in /etc/zipl.conf: +
grep -R "^image\s*=" /etc/zipl.conf+ No line should be returned, if a line is returned zipl may load a different kernel than intended. + + And make sure that /boot/bootmap is newer than /boot/loader/entries/*.conf + and /etc/zipl.conf: +
find /boot/loader/entries/*.conf /etc/zipl.conf -newer /boot/bootmap+ No line should be returned, if a line is returned /boot/bootmap needs to be regenerated.