Skip to content
Snippets Groups Projects
Commit 0243e5cf authored by Jeff Vander Stoep's avatar Jeff Vander Stoep
Browse files

system_server.te: remove policy load permissions

Remove system server's permission to dynamically update SELinux
policy on the device.

1) This functionality has never been used, so we have no idea if
it works or not.

2) If system_server is compromised, this functionality allows a
complete bypass of the SELinux policy on the device. In particular,
an attacker can force a regression of the following patch
  * https://android-review.googlesource.com/138510
see also https://code.google.com/p/android/issues/detail?id=181826

3) Dynamic policy update can be used to bypass neverallow protections
enforced in CTS, by pushing a policy to the device after certification.
Such an updated policy could bring the device out of compliance or
deliberately introduce security weaknesses.

Bug: 22885422
Bug: 8949824
Change-Id: I3c64d64359060561102e1587531836b69cfeef00
parent 008d7f14
No related branches found
No related tags found
No related merge requests found
...@@ -351,9 +351,6 @@ r_dir_file(system_server, fscklogs) ...@@ -351,9 +351,6 @@ r_dir_file(system_server, fscklogs)
allow system_server fscklogs:dir { write remove_name }; allow system_server fscklogs:dir { write remove_name };
allow system_server fscklogs:file unlink; allow system_server fscklogs:file unlink;
# For SELinuxPolicyInstallReceiver
selinux_manage_policy(system_server)
# logd access, system_server inherit logd write socket # logd access, system_server inherit logd write socket
# (urge is to deprecate this long term) # (urge is to deprecate this long term)
allow system_server zygote:unix_dgram_socket write; allow system_server zygote:unix_dgram_socket write;
......
...@@ -247,18 +247,6 @@ allow $1 security_file:dir r_dir_perms; ...@@ -247,18 +247,6 @@ allow $1 security_file:dir r_dir_perms;
allow $1 security_file:file r_file_perms; allow $1 security_file:file r_file_perms;
') ')
#####################################
# selinux_manage_policy(domain)
# Ability to manage policy files and
# trigger runtime reload.
define(`selinux_manage_policy', `
security_access_policy($1)
allow $1 security_file:dir create_dir_perms;
allow $1 security_file:file create_file_perms;
allow $1 security_file:lnk_file { create rename unlink };
set_prop($1, security_prop)
')
##################################### #####################################
# mmac_manage_policy(domain) # mmac_manage_policy(domain)
# Ability to manage mmac policy files, # Ability to manage mmac policy files,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment