Skip to content
Snippets Groups Projects
Commit 959fdaaa authored by Stephen Smalley's avatar Stephen Smalley
Browse files

Remove unlabeled execute access from domain, add to appdomain.


Otherwise all domains can create/write files that are executable
by all other domains.  If I understand correctly, this should
only be necessary for app domains executing content from legacy
unlabeled userdata partitions on existing devices and zygote
and system_server mappings of dalvikcache files, so only allow
it for those domains.

If required for others, add it to the individual
domain .te file, not for all domains.

Change-Id: I6f5715eb1ecf2911e70772b9ab4e531feea18819
Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
parent c50bf17d
No related branches found
No related tags found
No related merge requests found
...@@ -158,6 +158,10 @@ allow appdomain usbaccessory_device:chr_file { read write getattr }; ...@@ -158,6 +158,10 @@ allow appdomain usbaccessory_device:chr_file { read write getattr };
# For art. # For art.
allow appdomain dalvikcache_data_file:file execute; allow appdomain dalvikcache_data_file:file execute;
# For legacy unlabeled userdata on existing devices.
# See discussion of Unlabeled files in domain.te for more information.
allow appdomain unlabeled:file x_file_perms;
### ###
### CTS-specific rules ### CTS-specific rules
### ###
......
...@@ -129,7 +129,7 @@ allow domain security_file:file getattr; ...@@ -129,7 +129,7 @@ allow domain security_file:file getattr;
# capability, it's essentially useless. This is needed to allow an app with # capability, it's essentially useless. This is needed to allow an app with
# relabelto to relabel unlabeled files. # relabelto to relabel unlabeled files.
# #
allow domain unlabeled:file { create_file_perms rwx_file_perms relabelfrom }; allow domain unlabeled:file { create_file_perms relabelfrom };
allow domain unlabeled:dir { create_dir_perms relabelfrom }; allow domain unlabeled:dir { create_dir_perms relabelfrom };
allow domain unlabeled:lnk_file { create_file_perms }; allow domain unlabeled:lnk_file { create_file_perms };
neverallow { domain -relabeltodomain } *:dir_file_class_set relabelto; neverallow { domain -relabeltodomain } *:dir_file_class_set relabelto;
......
...@@ -239,3 +239,8 @@ allow system_server fscklogs:file unlink; ...@@ -239,3 +239,8 @@ allow system_server fscklogs:file unlink;
# For SELinuxPolicyInstallReceiver # For SELinuxPolicyInstallReceiver
selinux_manage_policy(system_server) selinux_manage_policy(system_server)
# For legacy unlabeled userdata on existing devices.
# See discussion of Unlabeled files in domain.te for more information.
# This rule is for dalvikcache mmap/mprotect PROT_EXEC.
allow system_server unlabeled:file execute;
...@@ -50,3 +50,8 @@ allow zygote ashmem_device:chr_file execute; ...@@ -50,3 +50,8 @@ allow zygote ashmem_device:chr_file execute;
allow zygote shell_data_file:file { write getattr }; allow zygote shell_data_file:file { write getattr };
allow zygote system_server:binder { transfer call }; allow zygote system_server:binder { transfer call };
allow zygote servicemanager:binder { call }; allow zygote servicemanager:binder { call };
# For legacy unlabeled userdata on existing devices.
# See discussion of Unlabeled files in domain.te for more information.
# This rule is for dalvikcache mmap/mprotect PROT_EXEC.
allow zygote unlabeled:file execute;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment