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

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