blob: 7a326a5b57a27e13b4c28088371727750d99dbfc [file] [log] [blame]
Jeff Vander Stoepbacb6d72017-02-13 13:33:27 -08001###
Jeff Vander Stoep3aa7ca52018-04-03 11:22:38 -07002### Untrusted_27.
Jeff Vander Stoepbacb6d72017-02-13 13:33:27 -08003###
Jeff Vander Stoep3aa7ca52018-04-03 11:22:38 -07004### This file defines the rules for untrusted apps running with
Yabin Cui5dc2c8c2018-11-02 11:12:43 -07005### 25 < targetSdkVersion <= 28.
Jeff Vander Stoep3aa7ca52018-04-03 11:22:38 -07006###
Jeff Vander Stoep1f7ae8e2020-01-20 10:14:48 +01007### See public/untrusted_app.te for more information about which apps are
8### placed in this selinux domain.
Jeff Vander Stoepbacb6d72017-02-13 13:33:27 -08009###
10
Jeff Vander Stoep3aa7ca52018-04-03 11:22:38 -070011typeattribute untrusted_app_27 coredomain;
Jeff Vander Stoepbacb6d72017-02-13 13:33:27 -080012
Jeff Vander Stoep3aa7ca52018-04-03 11:22:38 -070013app_domain(untrusted_app_27)
14untrusted_app_domain(untrusted_app_27)
15net_domain(untrusted_app_27)
16bluetooth_domain(untrusted_app_27)
Yabin Cui5dc2c8c2018-11-02 11:12:43 -070017
Jeff Vander Stoepc9aba122019-04-02 13:01:10 -070018# Text relocation support for API < 23. This is now disallowed for targetSdkVersion>=Q.
19# https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#text-relocations-enforced-for-api-level-23
20allow untrusted_app_27 { apk_data_file app_data_file asec_public_file }:file execmod;
21
Nick Kralevich65a89c12018-12-21 10:03:50 -080022# The ability to call exec() on files in the apps home directories
23# for targetApi 26, 27, and 28.
24allow untrusted_app_27 app_data_file:file execute_no_trans;
Alan Stokes3f63dbf2019-01-28 10:33:08 +000025auditallow untrusted_app_27 app_data_file:file { execute execute_no_trans };
David Brazdil535c5d22018-11-19 23:02:49 +000026
27# The ability to invoke dex2oat. Historically required by ART, now only
28# allowed for targetApi<=28 for compat reasons.
29allow untrusted_app_27 dex2oat_exec:file rx_file_perms;
Nick Kralevichcfe1bae2018-11-20 10:45:56 -080030userdebug_or_eng(`auditallow untrusted_app_27 dex2oat_exec:file rx_file_perms;')
Tri Vo73d0a672019-01-27 13:39:19 -080031
32# The ability to talk to /dev/ashmem directly. targetApi>=29 must use
33# ASharedMemory instead.
34allow untrusted_app_27 ashmem_device:chr_file rw_file_perms;
Tri Vo8b12ff52019-02-12 14:14:30 -080035auditallow untrusted_app_27 ashmem_device:chr_file open;
Tri Vo8eff3e22019-04-11 15:23:24 -070036
37# Read /mnt/sdcard symlink.
38allow untrusted_app_27 mnt_sdcard_file:lnk_file r_file_perms;