Skip to contentSkip to conversation

howl and modutil

PATCH Russell Coker 2 participants 2 messages Dec 24, 2004 – Jan 3, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Attached are patches for howl and modutil.

The howl patch allows the latest version of howl in rawhide to work correctly.

The modutil patch allows insmod_t to do everything it wants to do on my system including access to memory_device_t. insmod_t has ultimate access anyway so this doesn't seem to be a problem.

One thing I have been idly considering regarding modprobe is to re-write it to not use system(3) so it doesn't need access to shell_exec_t and thus can have assert_execute().

Signature · 4 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page
program/unused/howl.te renamed from usr/src/se/policy/domains/program/unused/howl.te +4 -2
@@ -4,8 +4,8 @@
 #
 
 daemon_domain(howl)
-allow howl_t proc_net_t:dir search;
-allow howl_t proc_net_t:file {getattr read };
+allow howl_t proc_net_t:dir r_dir_perms;
+allow howl_t proc_net_t:file { getattr read };
 can_network_server(howl_t)
 can_ypbind(howl_t)
 allow howl_t self:capability { kill net_admin };
@@ -15,6 +15,8 @@
 type howl_port_t, port_type;
 allow howl_t howl_port_t:{ udp_socket tcp_socket } name_bind;
 
+allow howl_t self:unix_dgram_socket create_socket_perms;
+
 allow howl_t etc_t:file { getattr read };
 allow howl_t initrc_var_run_t:file rw_file_perms;
 
program/modutil.te renamed from tmp/u/etc/selinux/strict/src/policy/domains/program/modutil.te +4 -3
@@ -69,7 +69,7 @@
 # Rules for the insmod_t domain.
 #
 
-type insmod_t, domain, privlog, sysctl_kernel_writer ifdef(`unlimitedUtils', `, admin, etc_writer, fs_domain, privmem, auth_write, privowner, privmodule, unrestricted' )
+type insmod_t, domain, privlog, sysctl_kernel_writer, privmem ifdef(`unlimitedUtils', `, admin, etc_writer, fs_domain, auth_write, privowner, privmodule, unrestricted' )
 ;
 role system_r types insmod_t;
 role sysadm_r types insmod_t;
@@ -99,7 +99,9 @@
 
 allow insmod_t { agp_device_t apm_bios_t }:chr_file { read write };
 
-allow insmod_t sound_device_t:chr_file { ioctl write };
+allow insmod_t sound_device_t:chr_file { read ioctl write };
+allow insmod_t zero_device_t:chr_file read;
+allow insmod_t memory_device_t:chr_file rw_file_perms;
 
 # Read module config and dependency information
 allow insmod_t { modules_conf_t modules_dep_t }:file { getattr read };
@@ -149,7 +151,6 @@
 
 allow insmod_t device_t:dir read;
 allow insmod_t devpts_t:dir { getattr search };
-dontaudit insmod_t sound_device_t:chr_file read;
 
 type insmod_exec_t, file_type, exec_type, sysadmfile;
 domain_auto_trans(privmodule, insmod_exec_t, insmod_t)
#1 lore raw

Merged both.

Quoted 11 lines · Russell Coker

Attached are patches for howl and modutil.

The howl patch allows the latest version of howl in rawhide to work correctly.

The modutil patch allows insmod_t to do everything it wants to do on my system including access to memory_device_t. insmod_t has ultimate access anyway so this doesn't seem to be a problem.

One thing I have been idly considering regarding modprobe is to re-write it to not use system(3) so it doesn't need access to shell_exec_t and thus can have assert_execute().

Signature · 7 lines
James Carter <[email protected]>
National Security Agency

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.