Skip to content
Snippets Groups Projects
Commit 9ab5a278 authored by Daniel Micay's avatar Daniel Micay Committed by android-build-merger
Browse files

only permit text relocations in untrusted_app

am: dc083f59

Change-Id: I38a2613d04dc0e59dc9e76dff39ab5ae9a024ae4
parents ff63c47d dc083f59
No related branches found
No related tags found
No related merge requests found
...@@ -215,7 +215,7 @@ allow appdomain shared_relro_file:file r_file_perms; ...@@ -215,7 +215,7 @@ allow appdomain shared_relro_file:file r_file_perms;
# Allow apps to read/execute installed binaries # Allow apps to read/execute installed binaries
allow appdomain apk_data_file:dir r_dir_perms; allow appdomain apk_data_file:dir r_dir_perms;
allow appdomain apk_data_file:file { rx_file_perms execmod }; allow appdomain apk_data_file:file rx_file_perms;
# /data/resource-cache # /data/resource-cache
allow appdomain resourcecache_data_file:file r_file_perms; allow appdomain resourcecache_data_file:file r_file_perms;
......
...@@ -483,7 +483,7 @@ neverallow * self:process { execstack execheap }; ...@@ -483,7 +483,7 @@ neverallow * self:process { execstack execheap };
# prohibit non-zygote spawned processes from using shared libraries # prohibit non-zygote spawned processes from using shared libraries
# with text relocations. b/20013628 . # with text relocations. b/20013628 .
neverallow { domain -appdomain } file_type:file execmod; neverallow { domain -untrusted_app } file_type:file execmod;
neverallow { domain -init } proc:{ file dir } mounton; neverallow { domain -init } proc:{ file dir } mounton;
......
...@@ -25,6 +25,9 @@ app_domain(untrusted_app) ...@@ -25,6 +25,9 @@ app_domain(untrusted_app)
net_domain(untrusted_app) net_domain(untrusted_app)
bluetooth_domain(untrusted_app) bluetooth_domain(untrusted_app)
# Legacy text relocations
allow untrusted_app apk_data_file:file execmod;
# Some apps ship with shared libraries and binaries that they write out # Some apps ship with shared libraries and binaries that they write out
# to their sandbox directory and then execute. # to their sandbox directory and then execute.
allow untrusted_app app_data_file:file { rx_file_perms execmod }; allow untrusted_app app_data_file:file { rx_file_perms execmod };
......
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