2013-07-13 01:33:29 +02:00
|
|
|
###
|
|
|
|
### Services with isolatedProcess=true in their manifest.
|
|
|
|
###
|
|
|
|
### This file defines the rules for isolated apps. An "isolated
|
|
|
|
### app" is an APP with UID between AID_ISOLATED_START (99000)
|
|
|
|
### and AID_ISOLATED_END (99999).
|
|
|
|
###
|
|
|
|
### isolated_app includes all the appdomain rules, plus the
|
|
|
|
### additional following rules:
|
|
|
|
###
|
|
|
|
|
2015-11-03 18:54:39 +01:00
|
|
|
type isolated_app, domain, domain_deprecated;
|
2013-07-13 01:33:29 +02:00
|
|
|
app_domain(isolated_app)
|
2014-06-28 00:19:04 +02:00
|
|
|
|
2014-11-21 18:28:42 +01:00
|
|
|
# Access already open app data files received over Binder or local socket IPC.
|
2015-04-09 18:55:12 +02:00
|
|
|
allow isolated_app app_data_file:file { read write getattr lock };
|
2014-11-21 18:28:42 +01:00
|
|
|
|
2014-12-17 00:45:26 +01:00
|
|
|
allow isolated_app activity_service:service_manager find;
|
|
|
|
allow isolated_app display_service:service_manager find;
|
|
|
|
|
2015-10-14 01:20:05 +02:00
|
|
|
# Google Breakpad (crash reporter for Chrome) relies on ptrace
|
|
|
|
# functionality. Without the ability to ptrace, the crash reporter
|
|
|
|
# tool is broken.
|
|
|
|
# b/20150694
|
|
|
|
# https://code.google.com/p/chromium/issues/detail?id=475270
|
|
|
|
allow isolated_app self:process ptrace;
|
|
|
|
|
2015-03-05 21:10:30 +01:00
|
|
|
#####
|
|
|
|
##### Neverallow
|
|
|
|
#####
|
|
|
|
|
2016-02-29 05:52:55 +01:00
|
|
|
# Do not allow isolated_app to directly open tun_device
|
|
|
|
neverallow isolated_app tun_device:chr_file open;
|
|
|
|
|
2016-01-08 19:35:19 +01:00
|
|
|
# Do not allow isolated_app to set system properties.
|
|
|
|
neverallow isolated_app property_socket:sock_file write;
|
|
|
|
neverallow isolated_app property_type:property_service set;
|
|
|
|
|
2015-03-05 21:10:30 +01:00
|
|
|
# Isolated apps should not directly open app data files themselves.
|
|
|
|
neverallow isolated_app app_data_file:file open;
|
|
|
|
|
2016-03-25 20:22:32 +01:00
|
|
|
# Only allow appending to /data/anr/traces.txt (b/27853304, b/18340553)
|
|
|
|
# TODO: are there situations where isolated_apps write to this file?
|
|
|
|
# TODO: should we tighten these restrictions further?
|
|
|
|
neverallow isolated_app anr_data_file:file ~{ open append };
|
|
|
|
neverallow isolated_app anr_data_file:dir ~search;
|
|
|
|
|
2015-03-05 21:10:30 +01:00
|
|
|
# b/17487348
|
|
|
|
# Isolated apps can only access two services,
|
|
|
|
# activity_service and display_service
|
|
|
|
neverallow isolated_app {
|
|
|
|
service_manager_type
|
2014-12-17 00:45:26 +01:00
|
|
|
-activity_service
|
|
|
|
-display_service
|
|
|
|
}:service_manager find;
|
2015-04-09 23:31:16 +02:00
|
|
|
|
|
|
|
# Isolated apps shouldn't be able to access the driver directly.
|
|
|
|
neverallow isolated_app gpu_device:chr_file { rw_file_perms execute };
|
2015-10-16 02:11:27 +02:00
|
|
|
|
|
|
|
# Do not allow isolated_app access to /cache
|
|
|
|
neverallow isolated_app cache_file:dir ~{ r_dir_perms };
|
|
|
|
neverallow isolated_app cache_file:file ~{ read getattr };
|