|
|
12e95e |
From 742e103392746dac771663247d169cfe498ee658 Mon Sep 17 00:00:00 2001
|
|
|
12e95e |
From: Vojtech Polasek <vpolasek@redhat.com>
|
|
|
12e95e |
Date: Fri, 21 Jan 2022 14:02:16 +0100
|
|
|
12e95e |
Subject: [PATCH 1/7] modify vsyscall rules according to rhel9 ospp
|
|
|
12e95e |
|
|
|
12e95e |
add references
|
|
|
12e95e |
make rules scored in th e profile
|
|
|
12e95e |
---
|
|
|
12e95e |
.../system/bootloader-grub2/grub2_vsyscall_argument/rule.yml | 1 +
|
|
|
12e95e |
.../system/bootloader-zipl/zipl_vsyscall_argument/rule.yml | 3 +++
|
|
|
12e95e |
products/rhel9/profiles/ospp.profile | 4 ----
|
|
|
12e95e |
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
12e95e |
|
|
|
12e95e |
diff --git a/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml
|
|
|
12e95e |
index 1dd26fea9b6..9f38a1c13b9 100644
|
|
|
12e95e |
--- a/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-grub2/grub2_vsyscall_argument/rule.yml
|
|
|
12e95e |
@@ -25,6 +25,7 @@ identifiers:
|
|
|
12e95e |
references:
|
|
|
12e95e |
disa: CCI-001084
|
|
|
12e95e |
nist: CM-7(a)
|
|
|
12e95e |
+ ospp: FPT_ASLR_EXT.1
|
|
|
12e95e |
srg: SRG-OS-000480-GPOS-00227,SRG-OS-000134-GPOS-00068
|
|
|
12e95e |
stigid@ol8: OL08-00-010422
|
|
|
12e95e |
stigid@rhel8: RHEL-08-010422
|
|
|
12e95e |
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
|
|
|
12e95e |
index 52b192ffc52..9d645c8876e 100644
|
|
|
12e95e |
--- a/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-zipl/zipl_vsyscall_argument/rule.yml
|
|
|
12e95e |
@@ -21,6 +21,9 @@ identifiers:
|
|
|
12e95e |
cce@rhel8: CCE-83381-4
|
|
|
12e95e |
cce@rhel9: CCE-84100-7
|
|
|
12e95e |
|
|
|
12e95e |
+references:
|
|
|
12e95e |
+ ospp: FPT_ASLR_EXT.1
|
|
|
12e95e |
+
|
|
|
12e95e |
ocil_clause: 'vsyscalls are enabled'
|
|
|
12e95e |
|
|
|
12e95e |
ocil: |-
|
|
|
12e95e |
diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
index 287a28c43c5..f0b850a4ced 100644
|
|
|
12e95e |
--- a/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
+++ b/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
@@ -128,8 +128,6 @@ selections:
|
|
|
12e95e |
- grub2_slub_debug_argument
|
|
|
12e95e |
- grub2_page_poison_argument
|
|
|
12e95e |
- grub2_vsyscall_argument
|
|
|
12e95e |
- - grub2_vsyscall_argument.role=unscored
|
|
|
12e95e |
- - grub2_vsyscall_argument.severity=info
|
|
|
12e95e |
- grub2_pti_argument
|
|
|
12e95e |
- grub2_kernel_trust_cpu_rng
|
|
|
12e95e |
|
|
|
12e95e |
@@ -421,5 +419,3 @@ selections:
|
|
|
12e95e |
- zipl_slub_debug_argument
|
|
|
12e95e |
- zipl_page_poison_argument
|
|
|
12e95e |
- zipl_vsyscall_argument
|
|
|
12e95e |
- - zipl_vsyscall_argument.role=unscored
|
|
|
12e95e |
- - zipl_vsyscall_argument.severity=info
|
|
|
12e95e |
|
|
|
12e95e |
From d167658d46accbc75200a5d145a746322f1c2d4a Mon Sep 17 00:00:00 2001
|
|
|
12e95e |
From: Vojtech Polasek <vpolasek@redhat.com>
|
|
|
12e95e |
Date: Fri, 21 Jan 2022 14:05:24 +0100
|
|
|
12e95e |
Subject: [PATCH 2/7] add ospp references to fips rules
|
|
|
12e95e |
|
|
|
12e95e |
---
|
|
|
12e95e |
.../software/integrity/fips/enable_dracut_fips_module/rule.yml | 1 +
|
|
|
12e95e |
.../system/software/integrity/fips/enable_fips_mode/rule.yml | 2 +-
|
|
|
12e95e |
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
12e95e |
|
|
|
12e95e |
diff --git a/linux_os/guide/system/software/integrity/fips/enable_dracut_fips_module/rule.yml b/linux_os/guide/system/software/integrity/fips/enable_dracut_fips_module/rule.yml
|
|
|
12e95e |
index f342b9b8d95..3b7c3229b6f 100644
|
|
|
12e95e |
--- a/linux_os/guide/system/software/integrity/fips/enable_dracut_fips_module/rule.yml
|
|
|
12e95e |
+++ b/linux_os/guide/system/software/integrity/fips/enable_dracut_fips_module/rule.yml
|
|
|
12e95e |
@@ -29,6 +29,7 @@ references:
|
|
|
12e95e |
ism: "1446"
|
|
|
12e95e |
nerc-cip: CIP-003-8 R4.2,CIP-007-3 R5.1
|
|
|
12e95e |
nist: SC-12(2),SC-12(3),IA-7,SC-13,CM-6(a),SC-12
|
|
|
12e95e |
+ ospp: FCS_RBG_EXT.1
|
|
|
12e95e |
srg: SRG-OS-000478-GPOS-00223
|
|
|
12e95e |
stigid@ol8: OL08-00-010020
|
|
|
12e95e |
stigid@rhel8: RHEL-08-010020
|
|
|
12e95e |
diff --git a/linux_os/guide/system/software/integrity/fips/enable_fips_mode/rule.yml b/linux_os/guide/system/software/integrity/fips/enable_fips_mode/rule.yml
|
|
|
12e95e |
index 7559e61600d..9d89114b07f 100644
|
|
|
12e95e |
--- a/linux_os/guide/system/software/integrity/fips/enable_fips_mode/rule.yml
|
|
|
12e95e |
+++ b/linux_os/guide/system/software/integrity/fips/enable_fips_mode/rule.yml
|
|
|
12e95e |
@@ -39,7 +39,7 @@ references:
|
|
|
12e95e |
ism: "1446"
|
|
|
12e95e |
nerc-cip: CIP-003-8 R4.2,CIP-007-3 R5.1
|
|
|
12e95e |
nist: SC-12(2),SC-12(3),IA-7,SC-13,CM-6(a),SC-12
|
|
|
12e95e |
- ospp: FCS_COP.1(1),FCS_COP.1(2),FCS_COP.1(3),FCS_COP.1(4),FCS_CKM.1,FCS_CKM.2,FCS_TLSC_EXT.1
|
|
|
12e95e |
+ ospp: FCS_COP.1(1),FCS_COP.1(2),FCS_COP.1(3),FCS_COP.1(4),FCS_CKM.1,FCS_CKM.2,FCS_TLSC_EXT.1,FCS_RBG_EXT.1
|
|
|
12e95e |
srg: SRG-OS-000478-GPOS-00223,SRG-OS-000396-GPOS-00176
|
|
|
12e95e |
stigid@ol8: OL08-00-010020
|
|
|
12e95e |
stigid@rhel8: RHEL-08-010020
|
|
|
12e95e |
|
|
|
12e95e |
From f05e895bb96b64a5142e62e3dd0f7208633d5c23 Mon Sep 17 00:00:00 2001
|
|
|
12e95e |
From: Vojtech Polasek <vpolasek@redhat.com>
|
|
|
12e95e |
Date: Fri, 21 Jan 2022 14:08:36 +0100
|
|
|
12e95e |
Subject: [PATCH 3/7] drop no longer needed rules from ospp rhel9 profile
|
|
|
12e95e |
|
|
|
12e95e |
---
|
|
|
12e95e |
products/rhel9/profiles/ospp.profile | 6 ------
|
|
|
12e95e |
1 file changed, 6 deletions(-)
|
|
|
12e95e |
|
|
|
12e95e |
diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
index f0b850a4ced..7e30054bc98 100644
|
|
|
12e95e |
--- a/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
+++ b/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
@@ -125,11 +125,7 @@ selections:
|
|
|
12e95e |
## Boot prompt
|
|
|
12e95e |
- grub2_audit_argument
|
|
|
12e95e |
- grub2_audit_backlog_limit_argument
|
|
|
12e95e |
- - grub2_slub_debug_argument
|
|
|
12e95e |
- - grub2_page_poison_argument
|
|
|
12e95e |
- grub2_vsyscall_argument
|
|
|
12e95e |
- - grub2_pti_argument
|
|
|
12e95e |
- - grub2_kernel_trust_cpu_rng
|
|
|
12e95e |
|
|
|
12e95e |
## Security Settings
|
|
|
12e95e |
- sysctl_kernel_kptr_restrict
|
|
|
12e95e |
@@ -416,6 +412,4 @@ selections:
|
|
|
12e95e |
- zipl_bootmap_is_up_to_date
|
|
|
12e95e |
- zipl_audit_argument
|
|
|
12e95e |
- zipl_audit_backlog_limit_argument
|
|
|
12e95e |
- - zipl_slub_debug_argument
|
|
|
12e95e |
- - zipl_page_poison_argument
|
|
|
12e95e |
- zipl_vsyscall_argument
|
|
|
12e95e |
|
|
|
12e95e |
From 972ae269eff95de8a6914056d38e58b7aeafb8c3 Mon Sep 17 00:00:00 2001
|
|
|
12e95e |
From: Vojtech Polasek <vpolasek@redhat.com>
|
|
|
12e95e |
Date: Fri, 21 Jan 2022 15:12:46 +0100
|
|
|
12e95e |
Subject: [PATCH 4/7] add grub2_init_on_alloc rule
|
|
|
12e95e |
|
|
|
12e95e |
---
|
|
|
12e95e |
.../grub2_init_on_alloc_argument/rule.yml | 46 +++++++++++++++++++
|
|
|
12e95e |
shared/references/cce-redhat-avail.txt | 1 -
|
|
|
12e95e |
2 files changed, 46 insertions(+), 1 deletion(-)
|
|
|
12e95e |
create mode 100644 linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
|
|
|
12e95e |
diff --git a/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
new file mode 100644
|
|
|
12e95e |
index 00000000000..592e2fb117d
|
|
|
12e95e |
--- /dev/null
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
@@ -0,0 +1,46 @@
|
|
|
12e95e |
+documentation_complete: true
|
|
|
12e95e |
+
|
|
|
12e95e |
+prodtype: rhel9
|
|
|
12e95e |
+
|
|
|
12e95e |
+title: 'Configure kernel to zero out memory before allocation (through Grub2)'
|
|
|
12e95e |
+
|
|
|
12e95e |
+description: |-
|
|
|
12e95e |
+ To configure the kernel to zero out memory before allocating it, add the
|
|
|
12e95e |
+ <tt>init_on_alloc=1</tt> argument to the default GRUB 2 command line for
|
|
|
12e95e |
+ the Linux operating system in <tt>/etc/default/grub</tt>, in the manner
|
|
|
12e95e |
+ below:
|
|
|
12e95e |
+ GRUB_CMDLINE_LINUX="crashkernel=auto quiet rd.shell=0 audit=1 audit_backlog_limit=8192 init_on_alloc=1"
|
|
|
12e95e |
+ Update the boot parameter for existing kernels by running the following command:
|
|
|
12e95e |
+ # grubby --update-kernel=ALL --args="init_on_alloc=1"
|
|
|
12e95e |
+
|
|
|
12e95e |
+rationale: |-
|
|
|
12e95e |
+ When the kernel configuration option <tt>init_on_alloc</tt> is enabled,
|
|
|
12e95e |
+ all page allocator and slab allocator memory will be zeroed when allocated,
|
|
|
12e95e |
+ eliminating many kinds of "uninitialized heap memory" flaws, effectively
|
|
|
12e95e |
+ preventing data leaks.
|
|
|
12e95e |
+
|
|
|
12e95e |
+severity: medium
|
|
|
12e95e |
+
|
|
|
12e95e |
+identifiers:
|
|
|
12e95e |
+ cce@rhel9: CCE-85867-0
|
|
|
12e95e |
+
|
|
|
12e95e |
+ocil_clause: 'the kernel is not configured to zero out memory before allocation'
|
|
|
12e95e |
+
|
|
|
12e95e |
+ocil: |-
|
|
|
12e95e |
+ Make sure that the kernel is configured to zero out memory before
|
|
|
12e95e |
+ allocation. Ensure that the parameter is configured in
|
|
|
12e95e |
+ <tt>/etc/default/grub</tt>:
|
|
|
12e95e |
+ grep GRUB_CMDLINE_LINUX /etc/default/grub
|
|
|
12e95e |
+ The output should contain <tt>init_on_alloc=1</tt>.
|
|
|
12e95e |
+ Run the following command to display command line parameters of all
|
|
|
12e95e |
+ installed kernels:
|
|
|
12e95e |
+ # grubby --info=ALL | grep args
|
|
|
12e95e |
+ Ensure that each line contains the <tt>init_on_alloc=1</tt> parameter.
|
|
|
12e95e |
+
|
|
|
12e95e |
+platform: machine
|
|
|
12e95e |
+
|
|
|
12e95e |
+template:
|
|
|
12e95e |
+ name: grub2_bootloader_argument
|
|
|
12e95e |
+ vars:
|
|
|
12e95e |
+ arg_name: init_on_alloc
|
|
|
12e95e |
+ arg_value: '1'
|
|
|
12e95e |
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
|
|
|
12e95e |
index 8aad24b20f7..6835189cd99 100644
|
|
|
12e95e |
--- a/shared/references/cce-redhat-avail.txt
|
|
|
12e95e |
+++ b/shared/references/cce-redhat-avail.txt
|
|
|
12e95e |
@@ -1,4 +1,3 @@
|
|
|
12e95e |
-CCE-85867-0
|
|
|
12e95e |
CCE-85868-8
|
|
|
12e95e |
CCE-85872-0
|
|
|
12e95e |
CCE-85873-8
|
|
|
12e95e |
|
|
|
12e95e |
From a865514257c85d79aaf7e4286d8723aa1ad8de03 Mon Sep 17 00:00:00 2001
|
|
|
12e95e |
From: Vojtech Polasek <vpolasek@redhat.com>
|
|
|
12e95e |
Date: Mon, 24 Jan 2022 10:01:23 +0100
|
|
|
12e95e |
Subject: [PATCH 5/7] add zipl_init_on_alloc_argument rule
|
|
|
12e95e |
|
|
|
12e95e |
---
|
|
|
12e95e |
.../zipl_init_on_alloc_argument/rule.yml | 41 +++++++++++++++++++
|
|
|
12e95e |
.../tests/correct_option.pass.sh | 15 +++++++
|
|
|
12e95e |
.../tests/missing_in_cmdline.fail.sh | 13 ++++++
|
|
|
12e95e |
.../tests/missing_in_entry.fail.sh | 13 ++++++
|
|
|
12e95e |
shared/references/cce-redhat-avail.txt | 1 -
|
|
|
12e95e |
5 files changed, 82 insertions(+), 1 deletion(-)
|
|
|
12e95e |
create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/correct_option.pass.sh
|
|
|
12e95e |
create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_cmdline.fail.sh
|
|
|
12e95e |
create mode 100644 linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_entry.fail.sh
|
|
|
12e95e |
|
|
|
12e95e |
diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
new file mode 100644
|
|
|
12e95e |
index 00000000000..b47a7757327
|
|
|
12e95e |
--- /dev/null
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
@@ -0,0 +1,41 @@
|
|
|
12e95e |
+documentation_complete: true
|
|
|
12e95e |
+
|
|
|
12e95e |
+prodtype: rhel9
|
|
|
12e95e |
+
|
|
|
12e95e |
+title: 'Configure kernel to zero out memory before allocation (through zIPl)'
|
|
|
12e95e |
+
|
|
|
12e95e |
+description: |-
|
|
|
12e95e |
+ To ensure that the kernel is configured to zero out memory before
|
|
|
12e95e |
+ allocation, check that all boot entries in
|
|
|
12e95e |
+ <tt>/boot/loader/entries/*.conf</tt> have <tt>init_on_alloc=1</tt>
|
|
|
12e95e |
+ included in its options.
|
|
|
12e95e |
+
|
|
|
12e95e |
+ To ensure that new kernels and boot entries continue to zero out memory
|
|
|
12e95e |
+ before allocation, add <tt>init_on_alloc=1</tt> to <tt>/etc/kernel/cmdline</tt>.
|
|
|
12e95e |
+
|
|
|
12e95e |
+rationale: |-
|
|
|
12e95e |
+ When the kernel configuration option <tt>init_on_alloc</tt> is enabled,
|
|
|
12e95e |
+ all page allocator and slab allocator memory will be zeroed when allocated,
|
|
|
12e95e |
+ eliminating many kinds of "uninitialized heap memory" flaws, effectively
|
|
|
12e95e |
+ preventing data leaks.
|
|
|
12e95e |
+
|
|
|
12e95e |
+severity: medium
|
|
|
12e95e |
+
|
|
|
12e95e |
+identifiers:
|
|
|
12e95e |
+ cce@rhel9: CCE-85868-8
|
|
|
12e95e |
+
|
|
|
12e95e |
+ocil_clause: 'the kernel is not configured to zero out memory before allocation'
|
|
|
12e95e |
+
|
|
|
12e95e |
+ocil: |-
|
|
|
12e95e |
+ To check that the kernel is configured to zero out memory before allocation
|
|
|
12e95e |
+ time, check all boot entries with following command:
|
|
|
12e95e |
+ sudo grep -L"^options\s+.*\binit_on_alloc=1\b" /boot/loader/entries/*.conf
|
|
|
12e95e |
+ No line should be returned, each line returned is a boot entry that doesn't enable audit.
|
|
|
12e95e |
+
|
|
|
12e95e |
+platform: machine
|
|
|
12e95e |
+
|
|
|
12e95e |
+template:
|
|
|
12e95e |
+ name: zipl_bls_entries_option
|
|
|
12e95e |
+ vars:
|
|
|
12e95e |
+ arg_name: init_on_alloc
|
|
|
12e95e |
+ arg_value: '1'
|
|
|
12e95e |
diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/correct_option.pass.sh b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/correct_option.pass.sh
|
|
|
12e95e |
new file mode 100644
|
|
|
12e95e |
index 00000000000..50cf1b78f70
|
|
|
12e95e |
--- /dev/null
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/correct_option.pass.sh
|
|
|
12e95e |
@@ -0,0 +1,15 @@
|
|
|
12e95e |
+#!/bin/bash
|
|
|
12e95e |
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
|
|
|
12e95e |
+
|
|
|
12e95e |
+# Make sure boot loader entries contain init_on_alloc=1
|
|
|
12e95e |
+for file in /boot/loader/entries/*.conf
|
|
|
12e95e |
+do
|
|
|
12e95e |
+ if ! grep -q '^options.*init_on_alloc=1.*$' "$file" ; then
|
|
|
12e95e |
+ sed -i '/^options / s/$/ init_on_alloc=1/' "$file"
|
|
|
12e95e |
+ fi
|
|
|
12e95e |
+done
|
|
|
12e95e |
+
|
|
|
12e95e |
+# Make sure /etc/kernel/cmdline contains init_on_alloc=1
|
|
|
12e95e |
+if ! grep -qs '^(.*\s)?init_on_alloc=1(\s.*)?$' /etc/kernel/cmdline ; then
|
|
|
12e95e |
+ echo "init_on_alloc=1" >> /etc/kernel/cmdline
|
|
|
12e95e |
+fi
|
|
|
12e95e |
diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_cmdline.fail.sh b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_cmdline.fail.sh
|
|
|
12e95e |
new file mode 100644
|
|
|
12e95e |
index 00000000000..7c0d9154776
|
|
|
12e95e |
--- /dev/null
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_cmdline.fail.sh
|
|
|
12e95e |
@@ -0,0 +1,13 @@
|
|
|
12e95e |
+#!/bin/bash
|
|
|
12e95e |
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
|
|
|
12e95e |
+
|
|
|
12e95e |
+# Make sure boot loader entries contain init_on_alloc=1
|
|
|
12e95e |
+for file in /boot/loader/entries/*.conf
|
|
|
12e95e |
+do
|
|
|
12e95e |
+ if ! grep -q '^options.*init_on_alloc=1.*$' "$file" ; then
|
|
|
12e95e |
+ sed -i '/^options / s/$/ init_on_alloc=1/' "$file"
|
|
|
12e95e |
+ fi
|
|
|
12e95e |
+done
|
|
|
12e95e |
+
|
|
|
12e95e |
+# Make sure /etc/kernel/cmdline doesn't contain init_on_alloc=1
|
|
|
12e95e |
+sed -Ei 's/(^.*)init_on_alloc=1(.*?)$/\1\2/' /etc/kernel/cmdline || true
|
|
|
12e95e |
diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_entry.fail.sh b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_entry.fail.sh
|
|
|
12e95e |
new file mode 100644
|
|
|
12e95e |
index 00000000000..9d330c9192d
|
|
|
12e95e |
--- /dev/null
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/tests/missing_in_entry.fail.sh
|
|
|
12e95e |
@@ -0,0 +1,13 @@
|
|
|
12e95e |
+#!/bin/bash
|
|
|
12e95e |
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9
|
|
|
12e95e |
+
|
|
|
12e95e |
+# Remove init_on_alloc=1 from all boot entries
|
|
|
12e95e |
+sed -Ei 's/(^options.*\s)init_on_alloc=1(.*?)$/\1\2/' /boot/loader/entries/*
|
|
|
12e95e |
+# But make sure one boot loader entry contains init_on_alloc=1
|
|
|
12e95e |
+sed -i '/^options / s/$/ init_on_alloc=1/' /boot/loader/entries/*rescue.conf
|
|
|
12e95e |
+sed -Ei 's/(^options.*\s)\$kernelopts(.*?)$/\1\2/' /boot/loader/entries/*rescue.conf
|
|
|
12e95e |
+
|
|
|
12e95e |
+# Make sure /etc/kernel/cmdline contains init_on_alloc=1
|
|
|
12e95e |
+if ! grep -qs '^(.*\s)?init_on_alloc=1(\s.*)?$' /etc/kernel/cmdline ; then
|
|
|
12e95e |
+ echo "init_on_alloc=1" >> /etc/kernel/cmdline
|
|
|
12e95e |
+fi
|
|
|
12e95e |
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
|
|
|
12e95e |
index 6835189cd99..05a641aeaf0 100644
|
|
|
12e95e |
--- a/shared/references/cce-redhat-avail.txt
|
|
|
12e95e |
+++ b/shared/references/cce-redhat-avail.txt
|
|
|
12e95e |
@@ -1,4 +1,3 @@
|
|
|
12e95e |
-CCE-85868-8
|
|
|
12e95e |
CCE-85872-0
|
|
|
12e95e |
CCE-85873-8
|
|
|
12e95e |
CCE-85874-6
|
|
|
12e95e |
|
|
|
12e95e |
From 9ca5ec04e734941b1c401369b6da6672b42824b1 Mon Sep 17 00:00:00 2001
|
|
|
12e95e |
From: Vojtech Polasek <vpolasek@redhat.com>
|
|
|
12e95e |
Date: Mon, 24 Jan 2022 10:07:24 +0100
|
|
|
12e95e |
Subject: [PATCH 6/7] add new rules to rhel9 ospp
|
|
|
12e95e |
|
|
|
12e95e |
---
|
|
|
12e95e |
products/rhel9/profiles/ospp.profile | 2 ++
|
|
|
12e95e |
1 file changed, 2 insertions(+)
|
|
|
12e95e |
|
|
|
12e95e |
diff --git a/products/rhel9/profiles/ospp.profile b/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
index 7e30054bc98..28c7e92d298 100644
|
|
|
12e95e |
--- a/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
+++ b/products/rhel9/profiles/ospp.profile
|
|
|
12e95e |
@@ -126,6 +126,7 @@ selections:
|
|
|
12e95e |
- grub2_audit_argument
|
|
|
12e95e |
- grub2_audit_backlog_limit_argument
|
|
|
12e95e |
- grub2_vsyscall_argument
|
|
|
12e95e |
+ - grub2_init_on_alloc_argument
|
|
|
12e95e |
|
|
|
12e95e |
## Security Settings
|
|
|
12e95e |
- sysctl_kernel_kptr_restrict
|
|
|
12e95e |
@@ -413,3 +414,4 @@ selections:
|
|
|
12e95e |
- zipl_audit_argument
|
|
|
12e95e |
- zipl_audit_backlog_limit_argument
|
|
|
12e95e |
- zipl_vsyscall_argument
|
|
|
12e95e |
+ - zipl_init_on_alloc_argument
|
|
|
12e95e |
|
|
|
12e95e |
From 42a118bcc615051ae4cd268a5fc758aa5d75108d Mon Sep 17 00:00:00 2001
|
|
|
12e95e |
From: Vojtech Polasek <vpolasek@redhat.com>
|
|
|
12e95e |
Date: Thu, 27 Jan 2022 14:08:20 +0100
|
|
|
12e95e |
Subject: [PATCH 7/7] make rule names consistent
|
|
|
12e95e |
|
|
|
12e95e |
---
|
|
|
12e95e |
.../bootloader-grub2/grub2_init_on_alloc_argument/rule.yml | 2 +-
|
|
|
12e95e |
.../system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml | 2 +-
|
|
|
12e95e |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
12e95e |
|
|
|
12e95e |
diff --git a/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
index 592e2fb117d..a9253c74cc6 100644
|
|
|
12e95e |
--- a/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-grub2/grub2_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
@@ -2,7 +2,7 @@ documentation_complete: true
|
|
|
12e95e |
|
|
|
12e95e |
prodtype: rhel9
|
|
|
12e95e |
|
|
|
12e95e |
-title: 'Configure kernel to zero out memory before allocation (through Grub2)'
|
|
|
12e95e |
+title: 'Configure kernel to zero out memory before allocation'
|
|
|
12e95e |
|
|
|
12e95e |
description: |-
|
|
|
12e95e |
To configure the kernel to zero out memory before allocating it, add the
|
|
|
12e95e |
diff --git a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
index b47a7757327..fa272250a28 100644
|
|
|
12e95e |
--- a/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
+++ b/linux_os/guide/system/bootloader-zipl/zipl_init_on_alloc_argument/rule.yml
|
|
|
12e95e |
@@ -2,7 +2,7 @@ documentation_complete: true
|
|
|
12e95e |
|
|
|
12e95e |
prodtype: rhel9
|
|
|
12e95e |
|
|
|
12e95e |
-title: 'Configure kernel to zero out memory before allocation (through zIPl)'
|
|
|
12e95e |
+title: 'Configure kernel to zero out memory before allocation in zIPL'
|
|
|
12e95e |
|
|
|
12e95e |
description: |-
|
|
|
12e95e |
To ensure that the kernel is configured to zero out memory before
|