Skip to contentSkip to conversation

selinux: change CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE default

RFC PATCH In review Paul Moore 2 participants 4 messages Sep 21, 2015 – Sep 23, 2015 SELinux security module

lore
Share & tools
lore

Paul Moore

author
#0 lore raw

RFC PATCH 1/1 selinux: change CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE default

Change the SELinux checkreqprot default value to 0 so that SELinux performs access control checking on the actual memory protections used by the kernel and not those requested by the application.

---
 security/selinux/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
security/selinux/Kconfig +2 -2
index bca1b74..8691e92 100644
@@ -78,7 +78,7 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
 	int "NSA SELinux checkreqprot default value"
 	depends on SECURITY_SELINUX
 	range 0 1
-	default 1
+	default 0
 	help
 	  This option sets the default value for the 'checkreqprot' flag
 	  that determines whether SELinux checks the protection requested
@@ -92,7 +92,7 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
 	  'checkreqprot=' boot parameter.  It may also be changed at runtime
 	  via /selinux/checkreqprot if authorized by policy.
 
-	  If you are unsure how to answer this question, answer 1.
+	  If you are unsure how to answer this question, answer 0.
 
 config SECURITY_SELINUX_POLICYDB_VERSION_MAX
 	bool "NSA SELinux maximum supported policy format version"
#1 lore raw
Quoted 5 lines · Paul Moore

Change the SELinux checkreqprot default value to 0 so that SELinux performs access control checking on the actual memory protections used by the kernel and not those requested by the application.

Any ideas on whether this breaks any supported version of RHEL or Fedora?

Quoted 18 lines
---
 security/selinux/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
security/selinux/Kconfig +1 -1
index bca1b74..8691e92 100644
@@ -78,7 +78,7 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
 	int "NSA SELinux checkreqprot default value"
 	depends on SECURITY_SELINUX
 	range 0 1
-	default 1
+	default 0
 	help
 	  This option sets the default value for the 'checkreqprot' flag
 	  that determines whether SELinux checks the protection requested

security/selinux/Kconfig config SECURITY_SELINUX_CHECKREQPROT_VALUE · line 98

Quoted 8 lines
security/selinux/Kconfig +1 -1
@@ -92,7 +92,7 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
 	  'checkreqprot=' boot parameter.  It may also be changed at runtime
 	  via /selinux/checkreqprot if authorized by policy.
 
-	  If you are unsure how to answer this question, answer 1.
+	  If you are unsure how to answer this question, answer 0.
 
 config SECURITY_SELINUX_POLICYDB_VERSION_MAX
 	bool "NSA SELinux maximum supported policy format version"

If we're killing legacy options, can we call this one (and the one that depends on it) too? They were only needed for Fedora 3 and 4, and people often trip over them because they blindly enable all of the SELinux options and thereby force their kernels to old policy versions.

author
#2 lore raw
Quoted 8 lines · Stephen Smalley
Quoted 5 lines · Paul Moore

Change the SELinux checkreqprot default value to 0 so that SELinux performs access control checking on the actual memory protections used by the kernel and not those requested by the application.

Any ideas on whether this breaks any supported version of RHEL or Fedora?

Rawhide currently sets /sys/fs/selinux/checkreqprot to 0 during boot and a little birdy told me that F22 does the same. We're currently looking into RHEL.

Quoted 26 lines
Quoted 26 lines
security/selinux/Kconfig +1 -1
index bca1b74..8691e92 100644
@@ -78,7 +78,7 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
 
 	int "NSA SELinux checkreqprot default value"
 	depends on SECURITY_SELINUX
 	range 0 1
 
-	default 1
+	default 0
 
security/selinux/Kconfig +1 -1
 	help
 
 	  This option sets the default value for the 'checkreqprot' flag
 	  that determines whether SELinux checks the protection requested
@@ -92,7 +92,7 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
 
 	  'checkreqprot=' boot parameter.  It may also be changed at runtime
 	  via /selinux/checkreqprot if authorized by policy.
 
-	  If you are unsure how to answer this question, answer 1.
+	  If you are unsure how to answer this question, answer 0.
 
Quoted 8 lines
Quoted 3 lines
security/selinux/Kconfig +0 -0
 config SECURITY_SELINUX_POLICYDB_VERSION_MAX

bool "NSA SELinux maximum supported policy format version"

If we're killing legacy options, can we call this one (and the one that depends on it) too? They were only needed for Fedora 3 and 4, and people often trip over them because they blindly enable all of the SELinux options and thereby force their kernels to old policy versions.

I have no emotional attachment to it, does anyone object?

Signature · 2 lines
paul moore
security @ redhat
author
#3 lore raw
In reply to Paul Moore
Quoted 8 lines · Paul Moore

Change the SELinux checkreqprot default value to 0 so that SELinux performs access control checking on the actual memory protections used by the kernel and not those requested by the application.

---
 security/selinux/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

FYI, I just merged this into selinux#next.

Quoted 22 lines
security/selinux/Kconfig +2 -2
index bca1b74..8691e92 100644
@@ -78,7 +78,7 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
 	int "NSA SELinux checkreqprot default value"
 	depends on SECURITY_SELINUX
 	range 0 1
-	default 1
+	default 0
 	help
 	  This option sets the default value for the 'checkreqprot' flag
 	  that determines whether SELinux checks the protection requested
@@ -92,7 +92,7 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
 	  'checkreqprot=' boot parameter.  It may also be changed at runtime
 	  via /selinux/checkreqprot if authorized by policy.
 
-	  If you are unsure how to answer this question, answer 1.
+	  If you are unsure how to answer this question, answer 0.
 
 config SECURITY_SELINUX_POLICYDB_VERSION_MAX
 	bool "NSA SELinux maximum supported policy format version"
Signature · 2 lines
paul moore
security @ redhat