|
|
a8c580 |
From 82c99e8de8f2ffef7d340fd7c1d9088367650eb5 Mon Sep 17 00:00:00 2001
|
|
|
a8c580 |
From: Watson Sato <wsato@redhat.com>
|
|
|
a8c580 |
Date: Mon, 10 May 2021 18:53:02 +0200
|
|
|
a8c580 |
Subject: [PATCH] Update and select seboolean rules for R67
|
|
|
a8c580 |
|
|
|
a8c580 |
Fix description of sebool_deny_execmem, and warning about possible
|
|
|
a8c580 |
issues.
|
|
|
a8c580 |
Add rationale to rules the SELinux booleans.
|
|
|
a8c580 |
---
|
|
|
a8c580 |
controls/anssi.yml | 14 +++++++++---
|
|
|
a8c580 |
.../sebool_deny_execmem/rule.yml | 22 ++++++++++++++-----
|
|
|
a8c580 |
.../sebool_selinuxuser_execheap/rule.yml | 4 +++-
|
|
|
a8c580 |
.../sebool_selinuxuser_execstack/rule.yml | 3 ++-
|
|
|
a8c580 |
4 files changed, 33 insertions(+), 10 deletions(-)
|
|
|
a8c580 |
|
|
|
a8c580 |
diff --git a/controls/anssi.yml b/controls/anssi.yml
|
|
|
a8c580 |
index 705f8e25aab..ef9356a6fea 100644
|
|
|
a8c580 |
--- a/controls/anssi.yml
|
|
|
a8c580 |
+++ b/controls/anssi.yml
|
|
|
a8c580 |
@@ -967,10 +967,18 @@ controls:
|
|
|
a8c580 |
allow_execstack to off, forbids processes to make their stack executable;
|
|
|
a8c580 |
secure_mode_insmod to on, prohibits dynamic loading of modules by any process;
|
|
|
a8c580 |
ssh_sysadm_login to off, forbids SSH logins to connect directly in sysadmin role.
|
|
|
a8c580 |
+ notes:
|
|
|
a8c580 |
+ In RHEL, the SELinux boolean allow_execheap is renamed to selinuxuser_execheap, and the
|
|
|
a8c580 |
+ boolean allow_execstack is renamed to selinuxuser_execstack. And allow_execmem is not
|
|
|
a8c580 |
+ available, deny_execmem provides the same functionality.
|
|
|
a8c580 |
+ automated: yes
|
|
|
a8c580 |
rules:
|
|
|
a8c580 |
- # Add rule for sebool allow_execheap
|
|
|
a8c580 |
- # Add rule for sebool allow_execmem
|
|
|
a8c580 |
- # Add rule for sebool allow_execstack
|
|
|
a8c580 |
+ - var_selinuxuser_execheap=off
|
|
|
a8c580 |
+ - sebool_selinuxuser_execheap
|
|
|
a8c580 |
+ - var_deny_execmem=on
|
|
|
a8c580 |
+ - sebool_deny_execmem
|
|
|
a8c580 |
+ - var_selinuxuser_execstack=off
|
|
|
a8c580 |
+ - sebool_selinuxuser_execstack
|
|
|
a8c580 |
- var_secure_mode_insmod=on
|
|
|
a8c580 |
- sebool_secure_mode_insmod
|
|
|
a8c580 |
- sebool_ssh_sysadm_login
|
|
|
a8c580 |
diff --git a/linux_os/guide/system/selinux/selinux-booleans/sebool_deny_execmem/rule.yml b/linux_os/guide/system/selinux/selinux-booleans/sebool_deny_execmem/rule.yml
|
|
|
a8c580 |
index f340ea4be11..e8453fbfb8d 100644
|
|
|
a8c580 |
--- a/linux_os/guide/system/selinux/selinux-booleans/sebool_deny_execmem/rule.yml
|
|
|
a8c580 |
+++ b/linux_os/guide/system/selinux/selinux-booleans/sebool_deny_execmem/rule.yml
|
|
|
a8c580 |
@@ -2,14 +2,16 @@ documentation_complete: true
|
|
|
a8c580 |
|
|
|
a8c580 |
prodtype: rhel7,rhel8,rhv4
|
|
|
a8c580 |
|
|
|
a8c580 |
-title: 'Disable the deny_execmem SELinux Boolean'
|
|
|
a8c580 |
+title: 'Enable the deny_execmem SELinux Boolean'
|
|
|
a8c580 |
|
|
|
a8c580 |
description: |-
|
|
|
a8c580 |
By default, the SELinux boolean <tt>deny_execmem</tt> is disabled.
|
|
|
a8c580 |
- If this setting is enabled, it should be disabled.
|
|
|
a8c580 |
+ If this setting is disabled, it should be enabled.
|
|
|
a8c580 |
{{{ describe_sebool_disable(sebool="deny_execmem") }}}
|
|
|
a8c580 |
|
|
|
a8c580 |
-rationale: ""
|
|
|
a8c580 |
+rationale: |-
|
|
|
a8c580 |
+ Allowing user domain applications to map a memory region as both writable and
|
|
|
a8c580 |
+ executable makes them more susceptible to data execution attacks.
|
|
|
a8c580 |
|
|
|
a8c580 |
severity: medium
|
|
|
a8c580 |
|
|
|
a8c580 |
@@ -19,10 +21,20 @@ identifiers:
|
|
|
a8c580 |
|
|
|
a8c580 |
references:
|
|
|
a8c580 |
anssi: BP28(R67)
|
|
|
a8c580 |
-
|
|
|
a8c580 |
-{{{ complete_ocil_entry_sebool_disabled(sebool="deny_execmem") }}}
|
|
|
a8c580 |
+
|
|
|
a8c580 |
+{{{ complete_ocil_entry_sebool_enabled(sebool="deny_execmem") }}}
|
|
|
a8c580 |
+
|
|
|
a8c580 |
+warnings:
|
|
|
a8c580 |
+ - general: |-
|
|
|
a8c580 |
+ This rule doesn't come with a remediation, as enabling this SELinux boolean can cause
|
|
|
a8c580 |
+ applications to malfunction, for example Graphical login managers and Firefox.
|
|
|
a8c580 |
+ - functionality: |-
|
|
|
a8c580 |
+ Proper function and stability should be assessed before applying enabling the SELinux boolean in production systems.
|
|
|
a8c580 |
|
|
|
a8c580 |
template:
|
|
|
a8c580 |
name: sebool
|
|
|
a8c580 |
vars:
|
|
|
a8c580 |
seboolid: deny_execmem
|
|
|
a8c580 |
+ backends:
|
|
|
a8c580 |
+ bash: "off"
|
|
|
a8c580 |
+ ansible: "off"
|
|
|
a8c580 |
diff --git a/linux_os/guide/system/selinux/selinux-booleans/sebool_selinuxuser_execheap/rule.yml b/linux_os/guide/system/selinux/selinux-booleans/sebool_selinuxuser_execheap/rule.yml
|
|
|
a8c580 |
index 45aa81a1223..7fedaab6130 100644
|
|
|
a8c580 |
--- a/linux_os/guide/system/selinux/selinux-booleans/sebool_selinuxuser_execheap/rule.yml
|
|
|
a8c580 |
+++ b/linux_os/guide/system/selinux/selinux-booleans/sebool_selinuxuser_execheap/rule.yml
|
|
|
a8c580 |
@@ -6,10 +6,12 @@ title: 'Disable the selinuxuser_execheap SELinux Boolean'
|
|
|
a8c580 |
|
|
|
a8c580 |
description: |-
|
|
|
a8c580 |
By default, the SELinux boolean <tt>selinuxuser_execheap</tt> is disabled.
|
|
|
a8c580 |
+ When enabled this boolean is enabled it allows selinuxusers to execute code from the heap.
|
|
|
a8c580 |
If this setting is enabled, it should be disabled.
|
|
|
a8c580 |
{{{ describe_sebool_disable(sebool="selinuxuser_execheap") }}}
|
|
|
a8c580 |
|
|
|
a8c580 |
-rationale: ""
|
|
|
a8c580 |
+rationale: |-
|
|
|
a8c580 |
+ Disabling code execution from the heap blocks buffer overflow attacks.
|
|
|
a8c580 |
|
|
|
a8c580 |
severity: medium
|
|
|
a8c580 |
|
|
|
a8c580 |
diff --git a/linux_os/guide/system/selinux/selinux-booleans/sebool_selinuxuser_execstack/rule.yml b/linux_os/guide/system/selinux/selinux-booleans/sebool_selinuxuser_execstack/rule.yml
|
|
|
a8c580 |
index 2b20d0bfe4f..2e0b19f881d 100644
|
|
|
a8c580 |
--- a/linux_os/guide/system/selinux/selinux-booleans/sebool_selinuxuser_execstack/rule.yml
|
|
|
a8c580 |
+++ b/linux_os/guide/system/selinux/selinux-booleans/sebool_selinuxuser_execstack/rule.yml
|
|
|
a8c580 |
@@ -10,7 +10,8 @@ description: |-
|
|
|
a8c580 |
to make their stack executable.
|
|
|
a8c580 |
{{{ describe_sebool_disable(sebool="selinuxuser_execstack") }}}
|
|
|
a8c580 |
|
|
|
a8c580 |
-rationale: ""
|
|
|
a8c580 |
+rationale: |-
|
|
|
a8c580 |
+ Disabling code execution from the stack blocks buffer overflow attacks.
|
|
|
a8c580 |
|
|
|
a8c580 |
severity: medium
|
|
|
a8c580 |
|