All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] [PATCH] Add module_load permission to can_load_kernmodule
@ 2016-08-07 21:08 Guido Trentalancia
  2016-08-09 14:18 ` [refpolicy] [PATCH v2] " Guido Trentalancia
  0 siblings, 1 reply; 15+ messages in thread
From: Guido Trentalancia @ 2016-08-07 21:08 UTC (permalink / raw)
  To: refpolicy

The "module_load" permission has been recently added to the "system"
class (kernel 4.7).

The following patch updates the Reference Policy so that the new
permission is allowed when a kernel module should be loaded.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
---
 policy/modules/kernel/kernel.te |    4 ++++
 1 file changed, 4 insertions(+)

--- refpolicy-git-06082016-orig/policy/modules/kernel/kernel.te	2016-08-06 21:26:43.287774191 +0200
+++ refpolicy-git-06082016/policy/modules/kernel/kernel.te	2016-08-07 22:39:58.704800333 +0200
@@ -18,6 +18,7 @@ attribute can_receive_kernel_messages;
 attribute can_dump_kernel;
 
 neverallow ~can_load_kernmodule self:capability sys_module;
+neverallow ~can_load_kernmodule modules_object_t:system module_load;
 
 # domains with unconfined access to kernel resources
 attribute kern_unconfined;
@@ -216,6 +217,8 @@ allow kernel_t self:fd use;
 
 allow kernel_t debugfs_t:dir search_dir_perms;
 
+allow kernel_t modules_object_t:system ~module_load;
+
 allow kernel_t proc_t:dir list_dir_perms;
 allow kernel_t proc_t:file read_file_perms;
 allow kernel_t proc_t:lnk_file read_lnk_file_perms;
@@ -428,6 +431,7 @@ optional_policy(`
 
 if( ! secure_mode_insmod ) {
 	allow can_load_kernmodule self:capability sys_module;
+	allow can_load_kernmodule modules_object_t:system module_load;
 
 	# load_module() calls stop_machine() which
 	# calls sched_setscheduler()

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-08-30 10:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-07 21:08 [refpolicy] [PATCH] Add module_load permission to can_load_kernmodule Guido Trentalancia
2016-08-09 14:18 ` [refpolicy] [PATCH v2] " Guido Trentalancia
2016-08-13 13:21   ` Chris PeBenito
2016-08-14 21:02     ` [refpolicy] [PATCH v3] " Guido Trentalancia
2016-08-14 21:23       ` Dominick Grift
2016-08-15 22:21         ` Guido Trentalancia
2016-08-15 22:22       ` [refpolicy] [PATCH v4] " Guido Trentalancia
2016-08-15 20:20         ` Chris PeBenito
2016-08-18 15:01           ` Guido Trentalancia
2016-08-17 19:37             ` Chris PeBenito
2016-08-19 13:27         ` [refpolicy] [PATCH v5] " Guido Trentalancia
2016-08-17 20:05           ` Chris PeBenito
2016-08-19 20:41             ` Guido Trentalancia
2016-08-30  0:30           ` Chris PeBenito
2016-08-30 10:58             ` Guido Trentalancia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.