Skip to content
Snippets Groups Projects
Commit 72a2d64d authored by Jeffrey Vander Stoep's avatar Jeffrey Vander Stoep Committed by Gerrit Code Review
Browse files

Merge changes from topic 'blacklist_app_data_execute'

* changes:
  fix build: exclude bluetooth from neverallow restriction
  Remove platform_app from neverallow execute from /data
  Rework neverallow for /data execute permission
parents 91e84be2 e1b00f39
No related branches found
No related tags found
No related merge requests found
......@@ -437,6 +437,21 @@ neverallow appdomain {
tmpfs
}:lnk_file no_w_file_perms;
# Blacklist app domains not allowed to execute from /data
neverallow {
bluetooth
isolated_app
nfc
radio
shared_relro
system_app
} {
data_file_type
-dalvikcache_data_file
-system_data_file # shared libs in apks
-apk_data_file
}:file no_x_file_perms;
# Foreign dex profiles are just markers. Prevent apps to do anything but touch them.
neverallow appdomain user_profile_foreign_dex_data_file:file rw_file_perms;
neverallow appdomain user_profile_foreign_dex_data_file:dir { open getattr read ioctl remove_name };
......
......@@ -305,9 +305,7 @@ neverallow domain { cache_file cache_backup_file cache_private_backup_file cache
# Protect most domains from executing arbitrary content from /data.
neverallow {
domain
-untrusted_app
-priv_app
-shell
-appdomain
} {
data_file_type
-dalvikcache_data_file
......@@ -519,6 +517,11 @@ neverallow {
-zygote
} shell:process { transition dyntransition };
# Only domains spawned from zygote and runas may have the appdomain attribute.
neverallow { domain -runas -zygote } {
appdomain -shell userdebug_or_eng(`-su') -bluetooth
}:process { transition dyntransition };
# Minimize read access to shell- or app-writable symlinks.
# This is to prevent malicious symlink attacks.
neverallow {
......
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