Blame SOURCES/scap-security-guide-0.1.55-add_rule_sysctl_kernel_modules_disabled-PR_6533.patch

618a7c
From d5673795ba2f87ae1649c84591ee13d7876af0b2 Mon Sep 17 00:00:00 2001
618a7c
From: Vojtech Polasek <vpolasek@redhat.com>
618a7c
Date: Wed, 13 Jan 2021 14:01:03 +0100
618a7c
Subject: [PATCH 1/3] add rule
618a7c
618a7c
---
618a7c
 .../sysctl_kernel_modules_disabled/rule.yml   | 34 +++++++++++++++++++
618a7c
 1 file changed, 34 insertions(+)
618a7c
 create mode 100644 linux_os/guide/system/permissions/restrictions/sysctl_kernel_modules_disabled/rule.yml
618a7c
618a7c
diff --git a/linux_os/guide/system/permissions/restrictions/sysctl_kernel_modules_disabled/rule.yml b/linux_os/guide/system/permissions/restrictions/sysctl_kernel_modules_disabled/rule.yml
618a7c
new file mode 100644
618a7c
index 0000000000..1811c43815
618a7c
--- /dev/null
618a7c
+++ b/linux_os/guide/system/permissions/restrictions/sysctl_kernel_modules_disabled/rule.yml
618a7c
@@ -0,0 +1,34 @@
618a7c
+documentation_complete: true
618a7c
+
618a7c
+prodtype: fedora,ol8,rhel7,rhel8
618a7c
+
618a7c
+title: 'Disable loading and unloading of kernel modules'
618a7c
+
618a7c
+description: '{{{ describe_sysctl_option_value(sysctl="kernel.modules_disabled", value="1") }}}'
618a7c
+
618a7c
+rationale: |-
618a7c
+    Malicious kernel modules can have a significant impact on system security and
618a7c
+    availability. Disabling loading of kernel modules prevents this threat. Note
618a7c
+    that once this option has been set, it cannot be reverted without doing a
618a7c
+    system reboot. Make sure that all needed kernel modules are loaded before
618a7c
+    setting this option.
618a7c
+
618a7c
+severity: medium
618a7c
+
618a7c
+identifiers:
618a7c
+    cce@rhel7: CCE-83392-1
618a7c
+    cce@rhel8: CCE-83397-0
618a7c
+
618a7c
+references:
618a7c
+    anssi: BP28(R24)
618a7c
+
618a7c
+{{{ complete_ocil_entry_sysctl_option_value(sysctl="kernel.modules_disabled", value="1") }}}
618a7c
+
618a7c
+platform: machine
618a7c
+
618a7c
+template:
618a7c
+    name: sysctl
618a7c
+    vars:
618a7c
+        sysctlvar: kernel.modules_disabled
618a7c
+        sysctlval: '1'
618a7c
+        datatype: int
618a7c
618a7c
From 5e4f6a4a0b70c07488595080cfd98fdbfb02e352 Mon Sep 17 00:00:00 2001
618a7c
From: Vojtech Polasek <vpolasek@redhat.com>
618a7c
Date: Wed, 13 Jan 2021 14:01:15 +0100
618a7c
Subject: [PATCH 2/3] add rule to anssi profile
618a7c
618a7c
---
618a7c
 controls/anssi.yml | 3 ++-
618a7c
 1 file changed, 2 insertions(+), 1 deletion(-)
618a7c
618a7c
diff --git a/controls/anssi.yml b/controls/anssi.yml
618a7c
index 9e2b899b6d..f435459af3 100644
618a7c
--- a/controls/anssi.yml
618a7c
+++ b/controls/anssi.yml
618a7c
@@ -483,7 +483,8 @@ controls:
618a7c
       sysctl kernel.modules_disabledconf:
618a7c
       Prohibition of loading modules (except those already loaded to this point)
618a7c
       kernel.modules_disabled = 1
618a7c
-    # rules: TBD
618a7c
+    rules:
618a7c
+    - sysctl_kernel_modules_disabled
618a7c
 
618a7c
   - id: R25
618a7c
     level: enhanced
618a7c
618a7c
From a4a91fbb7f23854e4f80819a023c1adc4e7110c5 Mon Sep 17 00:00:00 2001
618a7c
From: Vojtech Polasek <vpolasek@redhat.com>
618a7c
Date: Thu, 14 Jan 2021 09:30:01 +0100
618a7c
Subject: [PATCH 3/3] remove cces from pool
618a7c
618a7c
---
618a7c
 shared/references/cce-redhat-avail.txt | 2 --
618a7c
 1 file changed, 2 deletions(-)
618a7c
618a7c
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
618a7c
index 4dbec8255c..137d975a3d 100644
618a7c
--- a/shared/references/cce-redhat-avail.txt
618a7c
+++ b/shared/references/cce-redhat-avail.txt
618a7c
@@ -1,5 +1,3 @@
618a7c
-CCE-83392-1
618a7c
-CCE-83397-0
618a7c
 CCE-83398-8
618a7c
 CCE-83399-6
618a7c
 CCE-83404-4