untrusted_app_27.te 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ###
  2. ### Untrusted_27.
  3. ###
  4. ### This file defines the rules for untrusted apps running with
  5. ### 25 < targetSdkVersion <= 28.
  6. ###
  7. ### This file defines the rules for untrusted apps.
  8. ### Apps are labeled based on mac_permissions.xml (maps signer and
  9. ### optionally package name to seinfo value) and seapp_contexts (maps UID
  10. ### and optionally seinfo value to domain for process and type for data
  11. ### directory). The untrusted_app_27 domain is the default assignment in
  12. ### seapp_contexts for any app with UID between APP_AID (10000)
  13. ### and AID_ISOLATED_START (99000) if the app has no specific seinfo
  14. ### value as determined from mac_permissions.xml. In current AOSP, this
  15. ### domain is assigned to all non-system apps as well as to any system apps
  16. ### that are not signed by the platform key. To move
  17. ### a system app into a specific domain, add a signer entry for it to
  18. ### mac_permissions.xml and assign it one of the pre-existing seinfo values
  19. ### or define and use a new seinfo value in both mac_permissions.xml and
  20. ### seapp_contexts.
  21. ###
  22. typeattribute untrusted_app_27 coredomain;
  23. app_domain(untrusted_app_27)
  24. untrusted_app_domain(untrusted_app_27)
  25. net_domain(untrusted_app_27)
  26. bluetooth_domain(untrusted_app_27)
  27. # Text relocation support for API < 23. This is now disallowed for targetSdkVersion>=Q.
  28. # https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#text-relocations-enforced-for-api-level-23
  29. allow untrusted_app_27 { apk_data_file app_data_file asec_public_file }:file execmod;
  30. # The ability to call exec() on files in the apps home directories
  31. # for targetApi 26, 27, and 28.
  32. allow untrusted_app_27 app_data_file:file execute_no_trans;
  33. auditallow untrusted_app_27 app_data_file:file { execute execute_no_trans };
  34. # The ability to invoke dex2oat. Historically required by ART, now only
  35. # allowed for targetApi<=28 for compat reasons.
  36. allow untrusted_app_27 dex2oat_exec:file rx_file_perms;
  37. userdebug_or_eng(`auditallow untrusted_app_27 dex2oat_exec:file rx_file_perms;')
  38. # The ability to talk to /dev/ashmem directly. targetApi>=29 must use
  39. # ASharedMemory instead.
  40. allow untrusted_app_27 ashmem_device:chr_file rw_file_perms;
  41. auditallow untrusted_app_27 ashmem_device:chr_file open;